diff --git a/swaggerci/resourcehealth/.gitattributes b/swaggerci/resourcehealth/.gitattributes
new file mode 100644
index 000000000000..2125666142eb
--- /dev/null
+++ b/swaggerci/resourcehealth/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/.gitignore b/swaggerci/resourcehealth/.gitignore
new file mode 100644
index 000000000000..7998f37e1e47
--- /dev/null
+++ b/swaggerci/resourcehealth/.gitignore
@@ -0,0 +1,5 @@
+bin
+obj
+.vs
+tools
+test/*-TestResults.xml
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/Az.ResourceHealth.csproj b/swaggerci/resourcehealth/Az.ResourceHealth.csproj
new file mode 100644
index 000000000000..76a9d4169205
--- /dev/null
+++ b/swaggerci/resourcehealth/Az.ResourceHealth.csproj
@@ -0,0 +1,44 @@
+
+
+
+ 0.1.0
+ 7.1
+ netstandard2.0
+ Library
+ Az.ResourceHealth.private
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth
+ true
+ false
+ ./bin
+ $(OutputPath)
+ Az.ResourceHealth.nuspec
+ true
+
+
+ 1998, 1591
+ true
+
+
+
+
+ false
+ TRACE;DEBUG;NETSTANDARD
+
+
+
+ true
+ true
+ MSSharedLibKey.snk
+ TRACE;RELEASE;NETSTANDARD;SIGN
+
+
+
+
+
+
+
+
+ $(DefaultItemExcludes);resources/**
+
+
+
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/Az.ResourceHealth.format.ps1xml b/swaggerci/resourcehealth/Az.ResourceHealth.format.ps1xml
new file mode 100644
index 000000000000..4232e4f49114
--- /dev/null
+++ b/swaggerci/resourcehealth/Az.ResourceHealth.format.ps1xml
@@ -0,0 +1,649 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.ResourceHealthIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.ResourceHealthIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ ResourceGroupName
+
+
+ ResourceUri
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Location
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityState
+
+
+ DetailedStatus
+
+
+ HealthEventCategory
+
+
+ HealthEventCause
+
+
+ HealthEventId
+
+
+ HealthEventType
+
+
+ OccurredTime
+
+
+ ReasonChronicity
+
+
+ ReasonType
+
+
+ ReportedTime
+
+
+ ResolutionEta
+
+
+ RootCauseAttributionTime
+
+
+ Summary
+
+
+ Title
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolved
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolved
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolvedTime
+
+
+ UnavailabilitySummary
+
+
+ UnavailableOccurredTime
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseError
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Detail
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedRegion
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedRegion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityState
+
+
+ OccurredTime
+
+
+ ReasonType
+
+
+ Summary
+
+
+ Title
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.Operation
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedAction
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action
+
+
+ ActionUrl
+
+
+ ActionUrlText
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEvent
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEvent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CorrelationId
+
+
+ EventStartTime
+
+
+ EventStatusLastModifiedTime
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IncidentType
+
+
+ Region
+
+
+ Service
+
+
+ Title
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatus
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatus
+
+
+
+
+
+
+
+
+
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.StatusBanner
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.StatusBanner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cloud
+
+
+ LastModifiedTime
+
+
+ Message
+
+
+ Title
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/Az.ResourceHealth.nuspec b/swaggerci/resourcehealth/Az.ResourceHealth.nuspec
new file mode 100644
index 000000000000..474700c2e84d
--- /dev/null
+++ b/swaggerci/resourcehealth/Az.ResourceHealth.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Az.ResourceHealth
+ 0.1.0
+ Microsoft Corporation
+ Microsoft Corporation
+ true
+ https://aka.ms/azps-license
+ https://github.com/Azure/azure-powershell
+ Microsoft Azure PowerShell: $(service-name) cmdlets
+
+ Microsoft Corporation. All rights reserved.
+ Azure ResourceManager ARM PSModule $(service-name)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/Az.ResourceHealth.psd1 b/swaggerci/resourcehealth/Az.ResourceHealth.psd1
new file mode 100644
index 000000000000..5590a2659774
--- /dev/null
+++ b/swaggerci/resourcehealth/Az.ResourceHealth.psd1
@@ -0,0 +1,24 @@
+@{
+ GUID = 'efd8f67b-8290-444b-a786-542bf758d704'
+ RootModule = './Az.ResourceHealth.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: ResourceHealth cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.ResourceHealth.private.dll'
+ FormatsToProcess = './Az.ResourceHealth.format.ps1xml'
+ FunctionsToExport = 'Get-AzResourceHealthAvailabilityStatuses', '*'
+ AliasesToExport = '*'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ResourceHealth'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
+}
diff --git a/swaggerci/resourcehealth/Az.ResourceHealth.psm1 b/swaggerci/resourcehealth/Az.ResourceHealth.psm1
new file mode 100644
index 000000000000..e5cfd7129442
--- /dev/null
+++ b/swaggerci/resourcehealth/Az.ResourceHealth.psm1
@@ -0,0 +1,107 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# 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://docs.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.ResourceHealth.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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
+
+
+ # 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.ResourceHealth.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/swaggerci/resourcehealth/MSSharedLibKey.snk b/swaggerci/resourcehealth/MSSharedLibKey.snk
new file mode 100644
index 000000000000..695f1b38774e
Binary files /dev/null and b/swaggerci/resourcehealth/MSSharedLibKey.snk differ
diff --git a/swaggerci/resourcehealth/README.md b/swaggerci/resourcehealth/README.md
new file mode 100644
index 000000000000..7c79cc0c0b76
--- /dev/null
+++ b/swaggerci/resourcehealth/README.md
@@ -0,0 +1,27 @@
+
+# Az.ResourceHealth
+This directory contains the PowerShell module for the ResourceHealth service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.ResourceHealth/)
+
+## 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.ResourceHealth`, see [how-to.md](how-to.md).
+
diff --git a/swaggerci/resourcehealth/build-module.ps1 b/swaggerci/resourcehealth/build-module.ps1
new file mode 100644
index 000000000000..dce33015a40b
--- /dev/null
+++ b/swaggerci/resourcehealth/build-module.ps1
@@ -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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$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 $Isolated -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 -Isolated
+
+ 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($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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.ResourceHealth'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @()
+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: ResourceHealth 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
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.ResourceHealth.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
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/swaggerci/resourcehealth/check-dependencies.ps1 b/swaggerci/resourcehealth/check-dependencies.ps1
new file mode 100644
index 000000000000..ec3055201a71
--- /dev/null
+++ b/swaggerci/resourcehealth/check-dependencies.ps1
@@ -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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ 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/swaggerci/resourcehealth/create-model-cmdlets.ps1 b/swaggerci/resourcehealth/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..eb610911038f
--- /dev/null
+++ b/swaggerci/resourcehealth/create-model-cmdlets.ps1
@@ -0,0 +1,163 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# 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([string[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated/api') 'Models'
+ $ModuleName = 'ResourceHealth'
+ $OutputDir = Join-Path $PSScriptRoot 'custom/autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+
+ $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()
+ foreach ($Model in $Models)
+ {
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$Model")
+ $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 = $Model
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith($ModuleName)) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = $ModuleName
+ }
+ $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)
+ {
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ 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 ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if($Type.Split('.').Split('.')[-2] -eq 'Support') {
+ # If Type is an array, need to strip []
+ $strippedType = $Type.Replace('[]', '')
+ $completer += "`n [ArgumentCompleter([${strippedType}])]"
+ }
+ $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 ""
+
+ $Script = "
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# 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://docs.microsoft.com/en-us/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
+#>
+function New-Az${ModulePrefix}${ObjectType}Object {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
diff --git a/swaggerci/resourcehealth/custom/Az.ResourceHealth.custom.psm1 b/swaggerci/resourcehealth/custom/Az.ResourceHealth.custom.psm1
new file mode 100644
index 000000000000..0cb7472afc69
--- /dev/null
+++ b/swaggerci/resourcehealth/custom/Az.ResourceHealth.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.ResourceHealth.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.ResourceHealth.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/swaggerci/resourcehealth/custom/README.md b/swaggerci/resourcehealth/custom/README.md
new file mode 100644
index 000000000000..ec3e42d98c5a
--- /dev/null
+++ b/swaggerci/resourcehealth/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.ResourceHealth` 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.ResourceHealth.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.ResourceHealth` 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth`. 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.ResourceHealth.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ResourceHealth`.
+- `Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.ResourceHealth`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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/swaggerci/resourcehealth/docs/Az.ResourceHealth.md b/swaggerci/resourcehealth/docs/Az.ResourceHealth.md
new file mode 100644
index 000000000000..a2425307325a
--- /dev/null
+++ b/swaggerci/resourcehealth/docs/Az.ResourceHealth.md
@@ -0,0 +1,16 @@
+---
+Module Name: Az.ResourceHealth
+Module Guid: efd8f67b-8290-444b-a786-542bf758d704
+Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.resourcehealth
+Help Version: 1.0.0.0
+Locale: en-US
+---
+
+# Az.ResourceHealth Module
+## Description
+Microsoft Azure PowerShell: ResourceHealth cmdlets
+
+## Az.ResourceHealth Cmdlets
+### [Get-AzResourceHealthAvailabilityStatuses](Get-AzResourceHealthAvailabilityStatuses.md)
+Gets current availability status for a single resource
+
diff --git a/swaggerci/resourcehealth/docs/Get-AzResourceHealthAvailabilityStatuses.md b/swaggerci/resourcehealth/docs/Get-AzResourceHealthAvailabilityStatuses.md
new file mode 100644
index 000000000000..fe881c1ee636
--- /dev/null
+++ b/swaggerci/resourcehealth/docs/Get-AzResourceHealthAvailabilityStatuses.md
@@ -0,0 +1,210 @@
+---
+external help file:
+Module Name: Az.ResourceHealth
+online version: https://docs.microsoft.com/en-us/powershell/module/az.resourcehealth/get-azresourcehealthavailabilitystatuses
+schema: 2.0.0
+---
+
+# Get-AzResourceHealthAvailabilityStatuses
+
+## SYNOPSIS
+Gets current availability status for a single resource
+
+## SYNTAX
+
+### List (Default)
+```
+Get-AzResourceHealthAvailabilityStatuses [-SubscriptionId ] [-Expand ] [-Filter ]
+ [-DefaultProfile ] []
+```
+
+### Get
+```
+Get-AzResourceHealthAvailabilityStatuses -ResourceUri [-Expand ] [-Filter ]
+ [-DefaultProfile ] []
+```
+
+### GetViaIdentity
+```
+Get-AzResourceHealthAvailabilityStatuses -InputObject [-Expand ]
+ [-Filter ] [-DefaultProfile ] []
+```
+
+### List1
+```
+Get-AzResourceHealthAvailabilityStatuses -ResourceGroupName [-SubscriptionId ]
+ [-Expand ] [-Filter ] [-DefaultProfile ] []
+```
+
+### List2
+```
+Get-AzResourceHealthAvailabilityStatuses -ResourceUri [-Expand ] [-Filter ]
+ [-DefaultProfile ] []
+```
+
+## DESCRIPTION
+Gets current availability status for a single resource
+
+## EXAMPLES
+
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+## PARAMETERS
+
+### -DefaultProfile
+The credentials, account, tenant, and subscription used for communication with Azure.
+
+```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
+```
+
+### -Expand
+Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Filter
+The filter to apply on the operation.
+For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -InputObject
+Identity Parameter
+To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity
+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.
+
+```yaml
+Type: System.String
+Parameter Sets: List1
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceUri
+The fully qualified ID of the resource, including the resource name and resource type.
+Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List2
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+Subscription credentials which uniquely identify Microsoft Azure subscription.
+The subscription ID forms part of the URI for every service call.
+
+```yaml
+Type: System.String[]
+Parameter Sets: 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.ResourceHealth.Models.IResourceHealthIdentity
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+
+## NOTES
+
+ALIASES
+
+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
+ - `[Id ]`: Resource identity path
+ - `[ResourceGroupName ]`: The name of the resource group.
+ - `[ResourceUri ]`: The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+
+## RELATED LINKS
+
diff --git a/swaggerci/resourcehealth/docs/README.md b/swaggerci/resourcehealth/docs/README.md
new file mode 100644
index 000000000000..868c105d9571
--- /dev/null
+++ b/swaggerci/resourcehealth/docs/README.md
@@ -0,0 +1,11 @@
+# Docs
+This directory contains the documentation of the cmdlets for the `Az.ResourceHealth` 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.ResourceHealth` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.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/swaggerci/resourcehealth/examples/Get-AzResourceHealthAvailabilityStatuses.md b/swaggerci/resourcehealth/examples/Get-AzResourceHealthAvailabilityStatuses.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/resourcehealth/examples/Get-AzResourceHealthAvailabilityStatuses.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/swaggerci/resourcehealth/export-surface.ps1 b/swaggerci/resourcehealth/export-surface.ps1
new file mode 100644
index 000000000000..3e54e9ed23f3
--- /dev/null
+++ b/swaggerci/resourcehealth/export-surface.ps1
@@ -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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin/Az.ResourceHealth.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.ResourceHealth'
+$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/swaggerci/resourcehealth/exports/Get-AzResourceHealthAvailabilityStatuses.ps1 b/swaggerci/resourcehealth/exports/Get-AzResourceHealthAvailabilityStatuses.ps1
new file mode 100644
index 000000000000..5c9ed0c23194
--- /dev/null
+++ b/swaggerci/resourcehealth/exports/Get-AzResourceHealthAvailabilityStatuses.ps1
@@ -0,0 +1,210 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Gets current availability status for a single resource
+.Description
+Gets current availability status for a single resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+.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
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [ResourceUri ]: The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.resourcehealth/get-azresourcehealthavailabilitystatuses
+#>
+function Get-AzResourceHealthAvailabilityStatuses {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List2', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [System.String]
+ # The fully qualified ID of the resource, including the resource name and resource type.
+ # Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ${ResourceUri},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Subscription credentials which uniquely identify Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Query')]
+ [System.String]
+ # Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ${Expand},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Query')]
+ [System.String]
+ # The filter to apply on the operation.
+ # For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ${Filter},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_Get';
+ GetViaIdentity = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_GetViaIdentity';
+ List = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List';
+ List1 = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List1';
+ List2 = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List2';
+ }
+ if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $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.ResourceHealth.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/swaggerci/resourcehealth/exports/ProxyCmdletDefinitions.ps1 b/swaggerci/resourcehealth/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..5c9ed0c23194
--- /dev/null
+++ b/swaggerci/resourcehealth/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,210 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Gets current availability status for a single resource
+.Description
+Gets current availability status for a single resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+.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
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [ResourceUri ]: The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.resourcehealth/get-azresourcehealthavailabilitystatuses
+#>
+function Get-AzResourceHealthAvailabilityStatuses {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List2', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [System.String]
+ # The fully qualified ID of the resource, including the resource name and resource type.
+ # Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ${ResourceUri},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Subscription credentials which uniquely identify Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Query')]
+ [System.String]
+ # Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ${Expand},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Query')]
+ [System.String]
+ # The filter to apply on the operation.
+ # For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ${Filter},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_Get';
+ GetViaIdentity = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_GetViaIdentity';
+ List = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List';
+ List1 = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List1';
+ List2 = 'Az.ResourceHealth.private\Get-AzResourceHealthAvailabilityStatuses_List2';
+ }
+ if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $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.ResourceHealth.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/swaggerci/resourcehealth/exports/README.md b/swaggerci/resourcehealth/exports/README.md
new file mode 100644
index 000000000000..57ec232ddb77
--- /dev/null
+++ b/swaggerci/resourcehealth/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.ResourceHealth`. No other cmdlets in this repository are directly exported. What that means is the `Az.ResourceHealth` module will run [Export-ModuleMember](https://docs.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.ResourceHealth.private.dll`) and from the `../custom/Az.ResourceHealth.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.ResourceHealth.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/swaggerci/resourcehealth/generate-help.ps1 b/swaggerci/resourcehealth/generate-help.ps1
new file mode 100644
index 000000000000..8351ac30a326
--- /dev/null
+++ b/swaggerci/resourcehealth/generate-help.ps1
@@ -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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ 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.ResourceHealth.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.ResourceHealth.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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
+
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/Module.cs b/swaggerci/resourcehealth/generated/Module.cs
new file mode 100644
index 000000000000..fb2517bec0a0
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/Module.cs
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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>;
+
+ /// 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();
+
+ /// the ISendAsync pipeline instance
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.HttpPipeline _pipelineWithProxy;
+
+ 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.ResourceHealth.MicrosoftResourceHealth 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; }
+
+ /// Backing field for property.
+ private static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.ResourceHealth";
+
+ /// 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.ResourceHealth";
+
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.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()
+ {
+ 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();
+ }
+
+ /// Creates the module instance.
+ private Module()
+ {
+ // constructor
+ ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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/swaggerci/resourcehealth/generated/api/MicrosoftResourceHealth.cs b/swaggerci/resourcehealth/generated/api/MicrosoftResourceHealth.cs
new file mode 100644
index 000000000000..55ca170c86c3
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/MicrosoftResourceHealth.cs
@@ -0,0 +1,870 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the Microsoft.ResourceHealth service.
+ /// The Resource Health Client.
+ ///
+ public partial class MicrosoftResourceHealth
+ {
+
+ /// Gets current availability status for a single resource
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently
+ /// the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesGetByResource(string resourceUri, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (resourceUri)
+ + "/providers/Microsoft.ResourceHealth/availabilityStatuses/current"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesGetByResource_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Gets current availability status for a single resource
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesGetByResourceViaIdentity(global::System.String viaIdentity, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.ResourceHealth/availabilityStatuses/current$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current'");
+ }
+
+ // replace URI parameters with values from identity
+ var resourceUri = _match.Groups["resourceUri"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + resourceUri
+ + "/providers/Microsoft.ResourceHealth/availabilityStatuses/current"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesGetByResource_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// 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.ResourceHealth.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 AvailabilityStatusesGetByResource_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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.ResponseCreated, _response); 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.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 fully qualified ID of the resource, including the resource name and resource type. Currently
+ /// the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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 AvailabilityStatusesGetByResource_Validate(string resourceUri, string Filter, string Expand, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(resourceUri),resourceUri);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Lists all historical availability transitions and impacting events for a single resource.
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently
+ /// the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesList(string resourceUri, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (resourceUri)
+ + "/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Lists the current availability status for all the resources in the resource group.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the resource group.
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesListByResourceGroup(string subscriptionId, string resourceGroupName, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-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/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Lists the current availability status for all the resources in the resource group.
+ ///
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesListByResourceGroupViaIdentity(global::System.String viaIdentity, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-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/Microsoft.ResourceHealth/availabilityStatuses$", 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/Microsoft.ResourceHealth/availabilityStatuses'");
+ }
+
+ // 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/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// 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.ResourceHealth.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 AvailabilityStatusesListByResourceGroup_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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.ResponseCreated, _response); 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.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the resource group.
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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 AvailabilityStatusesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, string Filter, string Expand, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Lists the current availability status for all the resources in the subscription.
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesListBySubscriptionId(string Filter, string subscriptionId, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesListBySubscriptionId_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Lists the current availability status for all the resources in the subscription.
+ ///
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesListBySubscriptionIdViaIdentity(global::System.String viaIdentity, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-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/Microsoft.ResourceHealth/availabilityStatuses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses'");
+ }
+
+ // 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/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesListBySubscriptionId_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// 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.ResourceHealth.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 AvailabilityStatusesListBySubscriptionId_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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.ResponseCreated, _response); 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.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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 AvailabilityStatusesListBySubscriptionId_Validate(string Filter, string subscriptionId, string Expand, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Lists all historical availability transitions and impacting events for a single resource.
+ ///
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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.ResourceHealth.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 AvailabilityStatusesListViaIdentity(global::System.String viaIdentity, string Filter, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.ResourceHealth/availabilityStatuses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses'");
+ }
+
+ // replace URI parameters with values from identity
+ var resourceUri = _match.Groups["resourceUri"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + resourceUri
+ + "/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AvailabilityStatusesList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// 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.ResourceHealth.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 AvailabilityStatusesList_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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.ResponseCreated, _response); 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.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 fully qualified ID of the resource, including the resource name and resource type. Currently
+ /// the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ /// 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 AvailabilityStatusesList_Validate(string resourceUri, string Filter, string Expand, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(resourceUri),resourceUri);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ /// Lists available operations for the resourcehealth resource 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.ResourceHealth.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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ResourceHealth/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists available operations for the resourcehealth resource 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.ResourceHealth.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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-05-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ResourceHealth/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ResourceHealth/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.ResourceHealth/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// 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.ResourceHealth.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.ResourceHealth.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.ResponseCreated, _response); 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.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.PowerShell.cs
new file mode 100644
index 000000000000..d0c0919a1415
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.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.ResourceHealth.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api10.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.ResourceHealth.Models.Api10.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.ResourceHealth.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.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 Resource(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.ResourceHealth.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// 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/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.TypeConverter.cs
new file mode 100644
index 000000000000..cedc3c0883cf
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api10/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.ResourceHealth.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api10.IResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.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/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.cs b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.cs
new file mode 100644
index 000000000000..63e637b0cc48
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.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.ResourceHealth.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ public partial class Resource :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// 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.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IJsonSerializable
+ {
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Fully qualified resource ID for the resource. Ex - /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.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the resource",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ 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. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ string Id { get; set; }
+ /// The name of the resource
+ string Name { 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/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.json.cs
new file mode 100644
index 000000000000..e0ac57645fc2
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api10/Resource.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.ResourceHealth.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new Resource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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;}
+ {_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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.PowerShell.cs
new file mode 100644
index 000000000000..279b952d762a
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.PowerShell.cs
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// availabilityStatus of a resource.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusTypeConverter))]
+ public partial class AvailabilityStatus
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AvailabilityStatus(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("RecentlyResolved"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolved = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved) content.GetValueForProperty("RecentlyResolved",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolved, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolvedTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("DetailedStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).DetailedStatus = (string) content.GetValueForProperty("DetailedStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).DetailedStatus, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonType = (string) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonType, global::System.Convert.ToString);
+ }
+ if (content.Contains("RootCauseAttributionTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RootCauseAttributionTime = (global::System.DateTime?) content.GetValueForProperty("RootCauseAttributionTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RootCauseAttributionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("HealthEventType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventType = (string) content.GetValueForProperty("HealthEventType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventType, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCause"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCause = (string) content.GetValueForProperty("HealthEventCause",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCause, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCategory"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCategory = (string) content.GetValueForProperty("HealthEventCategory",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCategory, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventId = (string) content.GetValueForProperty("HealthEventId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResolutionEta"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ResolutionEta = (global::System.DateTime?) content.GetValueForProperty("ResolutionEta",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ResolutionEta, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).OccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ReasonChronicity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonChronicity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes?) content.GetValueForProperty("ReasonChronicity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonChronicity, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes.CreateFrom);
+ }
+ if (content.Contains("ReportedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReportedTime = (global::System.DateTime?) content.GetValueForProperty("ReportedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReportedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecommendedAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecommendedAction = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[]) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecommendedAction, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedActionTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ServiceImpactingEvent"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ServiceImpactingEvent = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[]) content.GetValueForProperty("ServiceImpactingEvent",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ServiceImpactingEvent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("RecentlyResolvedUnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedUnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedUnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailabilitySummary = (string) content.GetValueForProperty("RecentlyResolvedUnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailabilitySummary, 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 AvailabilityStatus(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("RecentlyResolved"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolved = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved) content.GetValueForProperty("RecentlyResolved",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolved, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolvedTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("DetailedStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).DetailedStatus = (string) content.GetValueForProperty("DetailedStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).DetailedStatus, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonType = (string) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonType, global::System.Convert.ToString);
+ }
+ if (content.Contains("RootCauseAttributionTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RootCauseAttributionTime = (global::System.DateTime?) content.GetValueForProperty("RootCauseAttributionTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RootCauseAttributionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("HealthEventType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventType = (string) content.GetValueForProperty("HealthEventType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventType, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCause"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCause = (string) content.GetValueForProperty("HealthEventCause",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCause, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCategory"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCategory = (string) content.GetValueForProperty("HealthEventCategory",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventCategory, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventId = (string) content.GetValueForProperty("HealthEventId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).HealthEventId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResolutionEta"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ResolutionEta = (global::System.DateTime?) content.GetValueForProperty("ResolutionEta",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ResolutionEta, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).OccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ReasonChronicity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonChronicity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes?) content.GetValueForProperty("ReasonChronicity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReasonChronicity, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes.CreateFrom);
+ }
+ if (content.Contains("ReportedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReportedTime = (global::System.DateTime?) content.GetValueForProperty("ReportedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ReportedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecommendedAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecommendedAction = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[]) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecommendedAction, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedActionTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ServiceImpactingEvent"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ServiceImpactingEvent = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[]) content.GetValueForProperty("ServiceImpactingEvent",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).ServiceImpactingEvent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("RecentlyResolvedUnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedUnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedUnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailabilitySummary = (string) content.GetValueForProperty("RecentlyResolvedUnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal)this).RecentlyResolvedUnavailabilitySummary, 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.ResourceHealth.Models.Api20200501.IAvailabilityStatus DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AvailabilityStatus(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.ResourceHealth.Models.Api20200501.IAvailabilityStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AvailabilityStatus(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.ResourceHealth.Models.Api20200501.IAvailabilityStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// availabilityStatus of a resource.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusTypeConverter))]
+ public partial interface IAvailabilityStatus
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.TypeConverter.cs
new file mode 100644
index 000000000000..f6b96d633d1b
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AvailabilityStatusTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IAvailabilityStatus ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AvailabilityStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AvailabilityStatus.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AvailabilityStatus.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.cs
new file mode 100644
index 000000000000..675cd917651f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.cs
@@ -0,0 +1,462 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// availabilityStatus of a resource.
+ public partial class AvailabilityStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal
+ {
+
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).AvailabilityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).AvailabilityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues)""); }
+
+ /// Details of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string DetailedStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).DetailedStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).DetailedStatus = value ?? null; }
+
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string HealthEventCategory { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventCategory; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventCategory = value ?? null; }
+
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string HealthEventCause { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventCause; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventCause = value ?? null; }
+
+ /// It is a unique Id that identifies the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string HealthEventId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventId = value ?? null; }
+
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string HealthEventType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).HealthEventType = value ?? null; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Azure Resource Manager Identity for the availabilityStatuses resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _location;
+
+ /// Azure Resource Manager geo location of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Location { get => this._location; set => this._location = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for RecentlyResolved
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusInternal.RecentlyResolved { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolved; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolved = value; }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// current.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? OccurredTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).OccurredTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).OccurredTime = value ?? default(global::System.DateTime); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties _property;
+
+ /// Properties of availability state.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusProperties()); set => this._property = value; }
+
+ /// Chronicity of the availability transition.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReasonChronicity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReasonChronicity = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes)""); }
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string ReasonType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReasonType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReasonType = value ?? null; }
+
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RecentlyResolvedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedTime = value ?? default(global::System.DateTime); }
+
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string RecentlyResolvedUnavailabilitySummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedUnavailabilitySummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedUnavailabilitySummary = value ?? null; }
+
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedUnavailableOccurredTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecentlyResolvedUnavailableOccurredTime = value ?? default(global::System.DateTime); }
+
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecommendedAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RecommendedAction = value ?? null /* arrayOf */; }
+
+ /// Timestamp for when the health was last checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? ReportedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReportedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ReportedTime = value ?? default(global::System.DateTime); }
+
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? ResolutionEta { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ResolutionEta; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ResolutionEta = value ?? default(global::System.DateTime); }
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RootCauseAttributionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RootCauseAttributionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).RootCauseAttributionTime = value ?? default(global::System.DateTime); }
+
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ServiceImpactingEvent; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).ServiceImpactingEvent = value ?? null /* arrayOf */; }
+
+ /// Summary description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Summary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).Summary = value ?? null; }
+
+ /// Title description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)Property).Title = value ?? null; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Microsoft.ResourceHealth/AvailabilityStatuses.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Type { get => this._type; set => this._type = value; }
+
+ /// Creates an new instance.
+ public AvailabilityStatus()
+ {
+
+ }
+ }
+ /// availabilityStatus of a resource.
+ public partial interface IAvailabilityStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting event",
+ SerializedName = @"availabilityState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Details of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Details of the availability status.",
+ SerializedName = @"detailedStatus",
+ PossibleTypes = new [] { typeof(string) })]
+ string DetailedStatus { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples are Planned, Unplanned etc.",
+ SerializedName = @"healthEventCategory",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventCategory { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes where the health impacting event was originated. Examples are PlatformInitiated, UserInitiated etc.",
+ SerializedName = @"healthEventCause",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventCause { get; set; }
+ /// It is a unique Id that identifies the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"It is a unique Id that identifies the event",
+ SerializedName = @"healthEventId",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventId { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes when the health impacting event was originated. Examples are Lifecycle, Downtime, Fault Analysis etc.",
+ SerializedName = @"healthEventType",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventType { get; set; }
+ /// Azure Resource Manager Identity for the availabilityStatuses resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Azure Resource Manager Identity for the availabilityStatuses resource.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// Azure Resource Manager geo location of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Azure Resource Manager geo location of the resource.",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string Location { get; set; }
+ /// current.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"current.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when last change in health status occurred.",
+ SerializedName = @"occurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? OccurredTime { get; set; }
+ /// Chronicity of the availability transition.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Chronicity of the availability transition.",
+ SerializedName = @"reasonChronicity",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples are planned, unplanned, user initiated or an outage etc.",
+ SerializedName = @"reasonType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ReasonType { get; set; }
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp when the availabilityState changes to Available.",
+ SerializedName = @"resolvedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RecentlyResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Brief description of cause of the resource becoming unavailable.",
+ SerializedName = @"unavailabilitySummary",
+ PossibleTypes = new [] { typeof(string) })]
+ string RecentlyResolvedUnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the availabilityState changed to Unavailable",
+ SerializedName = @"unavailableOccurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get; set; }
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Lists actions the user can take based on the current availabilityState of the resource.",
+ SerializedName = @"recommendedActions",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get; set; }
+ /// Timestamp for when the health was last checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the health was last checked. ",
+ SerializedName = @"reportedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ReportedTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved.",
+ SerializedName = @"resolutionETA",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ResolutionEta { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was received.",
+ SerializedName = @"rootCauseAttributionTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RootCauseAttributionTime { get; set; }
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Lists the service impacting events that may be affecting the health of the resource.",
+ SerializedName = @"serviceImpactingEvents",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get; set; }
+ /// Summary description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Summary description of the availability status.",
+ SerializedName = @"summary",
+ PossibleTypes = new [] { typeof(string) })]
+ string Summary { get; set; }
+ /// Title description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title description of the availability status.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+ /// Microsoft.ResourceHealth/AvailabilityStatuses.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Microsoft.ResourceHealth/AvailabilityStatuses.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; set; }
+
+ }
+ /// availabilityStatus of a resource.
+ internal partial interface IAvailabilityStatusInternal
+
+ {
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Details of the availability status.
+ string DetailedStatus { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ string HealthEventCategory { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ string HealthEventCause { get; set; }
+ /// It is a unique Id that identifies the event
+ string HealthEventId { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ string HealthEventType { get; set; }
+ /// Azure Resource Manager Identity for the availabilityStatuses resource.
+ string Id { get; set; }
+ /// Azure Resource Manager geo location of the resource.
+ string Location { get; set; }
+ /// current.
+ string Name { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ global::System.DateTime? OccurredTime { get; set; }
+ /// Properties of availability state.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties Property { get; set; }
+ /// Chronicity of the availability transition.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ string ReasonType { get; set; }
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved RecentlyResolved { get; set; }
+ /// Timestamp when the availabilityState changes to Available.
+ global::System.DateTime? RecentlyResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ string RecentlyResolvedUnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get; set; }
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get; set; }
+ /// Timestamp for when the health was last checked.
+ global::System.DateTime? ReportedTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ global::System.DateTime? ResolutionEta { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ global::System.DateTime? RootCauseAttributionTime { get; set; }
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get; set; }
+ /// Summary description of the availability status.
+ string Summary { get; set; }
+ /// Title description of the availability status.
+ string Title { get; set; }
+ /// Microsoft.ResourceHealth/AvailabilityStatuses.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.json.cs
new file mode 100644
index 000000000000..70c9a6acd403
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatus.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// availabilityStatus of a resource.
+ public partial class AvailabilityStatus
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal AvailabilityStatus(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.AvailabilityStatusProperties.FromJson(__jsonProperties) : Property;}
+ {_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;}
+ {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new AvailabilityStatus(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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.PowerShell.cs
new file mode 100644
index 000000000000..8b10c78d2934
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.PowerShell.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// The List availabilityStatus operation response.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusListResultTypeConverter))]
+ public partial class AvailabilityStatusListResult
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AvailabilityStatusListResult(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)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 AvailabilityStatusListResult(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal)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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AvailabilityStatusListResult(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AvailabilityStatusListResult(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The List availabilityStatus operation response.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusListResultTypeConverter))]
+ public partial interface IAvailabilityStatusListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.TypeConverter.cs
new file mode 100644
index 000000000000..1284e845b7b1
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AvailabilityStatusListResultTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AvailabilityStatusListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusListResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusListResult.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.cs
new file mode 100644
index 000000000000..95fb74cae2aa
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// The List availabilityStatus operation response.
+ public partial class AvailabilityStatusListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResultInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ ///
+ /// The URI to fetch the next page of availabilityStatuses. Call ListNext() with this URI to fetch the next page of availabilityStatuses.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[] _value;
+
+ /// The list of availabilityStatuses.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public AvailabilityStatusListResult()
+ {
+
+ }
+ }
+ /// The List availabilityStatus operation response.
+ public partial interface IAvailabilityStatusListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ ///
+ /// The URI to fetch the next page of availabilityStatuses. Call ListNext() with this URI to fetch the next page of availabilityStatuses.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The URI to fetch the next page of availabilityStatuses. Call ListNext() with this URI to fetch the next page of availabilityStatuses.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// The list of availabilityStatuses.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The list of availabilityStatuses.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[] Value { get; set; }
+
+ }
+ /// The List availabilityStatus operation response.
+ internal partial interface IAvailabilityStatusListResultInternal
+
+ {
+ ///
+ /// The URI to fetch the next page of availabilityStatuses. Call ListNext() with this URI to fetch the next page of availabilityStatuses.
+ ///
+ string NextLink { get; set; }
+ /// The list of availabilityStatuses.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.json.cs
new file mode 100644
index 000000000000..969a1d5b4f56
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusListResult.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// The List availabilityStatus operation response.
+ public partial class AvailabilityStatusListResult
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal AvailabilityStatusListResult(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus) (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatus.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new AvailabilityStatusListResult(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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.PowerShell.cs
new file mode 100644
index 000000000000..c92b8fd11dc3
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.PowerShell.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Properties of availability state.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusPropertiesTypeConverter))]
+ public partial class AvailabilityStatusProperties
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AvailabilityStatusProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("RecentlyResolved"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolved = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved) content.GetValueForProperty("RecentlyResolved",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolved, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolvedTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("DetailedStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).DetailedStatus = (string) content.GetValueForProperty("DetailedStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).DetailedStatus, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonType = (string) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonType, global::System.Convert.ToString);
+ }
+ if (content.Contains("RootCauseAttributionTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RootCauseAttributionTime = (global::System.DateTime?) content.GetValueForProperty("RootCauseAttributionTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RootCauseAttributionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("HealthEventType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventType = (string) content.GetValueForProperty("HealthEventType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventType, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCause"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCause = (string) content.GetValueForProperty("HealthEventCause",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCause, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCategory"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCategory = (string) content.GetValueForProperty("HealthEventCategory",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCategory, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventId = (string) content.GetValueForProperty("HealthEventId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResolutionEta"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ResolutionEta = (global::System.DateTime?) content.GetValueForProperty("ResolutionEta",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ResolutionEta, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).OccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ReasonChronicity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonChronicity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes?) content.GetValueForProperty("ReasonChronicity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonChronicity, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes.CreateFrom);
+ }
+ if (content.Contains("ReportedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReportedTime = (global::System.DateTime?) content.GetValueForProperty("ReportedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReportedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecommendedAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecommendedAction = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[]) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecommendedAction, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedActionTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ServiceImpactingEvent"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ServiceImpactingEvent = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[]) content.GetValueForProperty("ServiceImpactingEvent",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ServiceImpactingEvent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("RecentlyResolvedUnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedUnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedUnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailabilitySummary = (string) content.GetValueForProperty("RecentlyResolvedUnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailabilitySummary, 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 AvailabilityStatusProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("RecentlyResolved"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolved = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved) content.GetValueForProperty("RecentlyResolved",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolved, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolvedTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("DetailedStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).DetailedStatus = (string) content.GetValueForProperty("DetailedStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).DetailedStatus, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonType = (string) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonType, global::System.Convert.ToString);
+ }
+ if (content.Contains("RootCauseAttributionTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RootCauseAttributionTime = (global::System.DateTime?) content.GetValueForProperty("RootCauseAttributionTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RootCauseAttributionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("HealthEventType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventType = (string) content.GetValueForProperty("HealthEventType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventType, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCause"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCause = (string) content.GetValueForProperty("HealthEventCause",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCause, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventCategory"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCategory = (string) content.GetValueForProperty("HealthEventCategory",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventCategory, global::System.Convert.ToString);
+ }
+ if (content.Contains("HealthEventId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventId = (string) content.GetValueForProperty("HealthEventId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).HealthEventId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResolutionEta"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ResolutionEta = (global::System.DateTime?) content.GetValueForProperty("ResolutionEta",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ResolutionEta, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).OccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ReasonChronicity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonChronicity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes?) content.GetValueForProperty("ReasonChronicity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReasonChronicity, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes.CreateFrom);
+ }
+ if (content.Contains("ReportedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReportedTime = (global::System.DateTime?) content.GetValueForProperty("ReportedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ReportedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecommendedAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecommendedAction = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[]) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecommendedAction, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedActionTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ServiceImpactingEvent"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ServiceImpactingEvent = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[]) content.GetValueForProperty("ServiceImpactingEvent",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).ServiceImpactingEvent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("RecentlyResolvedUnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedUnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedTime = (global::System.DateTime?) content.GetValueForProperty("RecentlyResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("RecentlyResolvedUnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailabilitySummary = (string) content.GetValueForProperty("RecentlyResolvedUnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal)this).RecentlyResolvedUnavailabilitySummary, 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.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AvailabilityStatusProperties(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AvailabilityStatusProperties(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of availability state.
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusPropertiesTypeConverter))]
+ public partial interface IAvailabilityStatusProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.TypeConverter.cs
new file mode 100644
index 000000000000..138e814a5c93
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AvailabilityStatusPropertiesTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AvailabilityStatusProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusProperties.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.cs
new file mode 100644
index 000000000000..1ce8dc01a278
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.cs
@@ -0,0 +1,439 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of availability state.
+ public partial class AvailabilityStatusProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? _availabilityState;
+
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get => this._availabilityState; set => this._availabilityState = value; }
+
+ /// Backing field for property.
+ private string _detailedStatus;
+
+ /// Details of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string DetailedStatus { get => this._detailedStatus; set => this._detailedStatus = value; }
+
+ /// Backing field for property.
+ private string _healthEventCategory;
+
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string HealthEventCategory { get => this._healthEventCategory; set => this._healthEventCategory = value; }
+
+ /// Backing field for property.
+ private string _healthEventCause;
+
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string HealthEventCause { get => this._healthEventCause; set => this._healthEventCause = value; }
+
+ /// Backing field for property.
+ private string _healthEventId;
+
+ /// It is a unique Id that identifies the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string HealthEventId { get => this._healthEventId; set => this._healthEventId = value; }
+
+ /// Backing field for property.
+ private string _healthEventType;
+
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string HealthEventType { get => this._healthEventType; set => this._healthEventType = value; }
+
+ /// Internal Acessors for RecentlyResolved
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesInternal.RecentlyResolved { get => (this._recentlyResolved = this._recentlyResolved ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolved()); set { {_recentlyResolved = value;} } }
+
+ /// Backing field for property.
+ private global::System.DateTime? _occurredTime;
+
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? OccurredTime { get => this._occurredTime; set => this._occurredTime = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? _reasonChronicity;
+
+ /// Chronicity of the availability transition.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get => this._reasonChronicity; set => this._reasonChronicity = value; }
+
+ /// Backing field for property.
+ private string _reasonType;
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string ReasonType { get => this._reasonType; set => this._reasonType = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved _recentlyResolved;
+
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved RecentlyResolved { get => (this._recentlyResolved = this._recentlyResolved ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolved()); set => this._recentlyResolved = value; }
+
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RecentlyResolvedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).ResolvedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).ResolvedTime = value ?? default(global::System.DateTime); }
+
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string RecentlyResolvedUnavailabilitySummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).UnavailabilitySummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).UnavailabilitySummary = value ?? null; }
+
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).UnavailableOccurredTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)RecentlyResolved).UnavailableOccurredTime = value ?? default(global::System.DateTime); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] _recommendedAction;
+
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get => this._recommendedAction; set => this._recommendedAction = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _reportedTime;
+
+ /// Timestamp for when the health was last checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? ReportedTime { get => this._reportedTime; set => this._reportedTime = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _resolutionEta;
+
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? ResolutionEta { get => this._resolutionEta; set => this._resolutionEta = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _rootCauseAttributionTime;
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? RootCauseAttributionTime { get => this._rootCauseAttributionTime; set => this._rootCauseAttributionTime = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] _serviceImpactingEvent;
+
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get => this._serviceImpactingEvent; set => this._serviceImpactingEvent = value; }
+
+ /// Backing field for property.
+ private string _summary;
+
+ /// Summary description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Summary { get => this._summary; set => this._summary = value; }
+
+ /// Backing field for property.
+ private string _title;
+
+ /// Title description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Title { get => this._title; set => this._title = value; }
+
+ /// Creates an new instance.
+ public AvailabilityStatusProperties()
+ {
+
+ }
+ }
+ /// Properties of availability state.
+ public partial interface IAvailabilityStatusProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting event",
+ SerializedName = @"availabilityState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Details of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Details of the availability status.",
+ SerializedName = @"detailedStatus",
+ PossibleTypes = new [] { typeof(string) })]
+ string DetailedStatus { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples are Planned, Unplanned etc.",
+ SerializedName = @"healthEventCategory",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventCategory { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes where the health impacting event was originated. Examples are PlatformInitiated, UserInitiated etc.",
+ SerializedName = @"healthEventCause",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventCause { get; set; }
+ /// It is a unique Id that identifies the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"It is a unique Id that identifies the event",
+ SerializedName = @"healthEventId",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventId { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"In case of an availability impacting event, it describes when the health impacting event was originated. Examples are Lifecycle, Downtime, Fault Analysis etc.",
+ SerializedName = @"healthEventType",
+ PossibleTypes = new [] { typeof(string) })]
+ string HealthEventType { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when last change in health status occurred.",
+ SerializedName = @"occurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? OccurredTime { get; set; }
+ /// Chronicity of the availability transition.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Chronicity of the availability transition.",
+ SerializedName = @"reasonChronicity",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples are planned, unplanned, user initiated or an outage etc.",
+ SerializedName = @"reasonType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ReasonType { get; set; }
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp when the availabilityState changes to Available.",
+ SerializedName = @"resolvedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RecentlyResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Brief description of cause of the resource becoming unavailable.",
+ SerializedName = @"unavailabilitySummary",
+ PossibleTypes = new [] { typeof(string) })]
+ string RecentlyResolvedUnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the availabilityState changed to Unavailable",
+ SerializedName = @"unavailableOccurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get; set; }
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Lists actions the user can take based on the current availabilityState of the resource.",
+ SerializedName = @"recommendedActions",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get; set; }
+ /// Timestamp for when the health was last checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the health was last checked. ",
+ SerializedName = @"reportedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ReportedTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved.",
+ SerializedName = @"resolutionETA",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ResolutionEta { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was received.",
+ SerializedName = @"rootCauseAttributionTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RootCauseAttributionTime { get; set; }
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Lists the service impacting events that may be affecting the health of the resource.",
+ SerializedName = @"serviceImpactingEvents",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get; set; }
+ /// Summary description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Summary description of the availability status.",
+ SerializedName = @"summary",
+ PossibleTypes = new [] { typeof(string) })]
+ string Summary { get; set; }
+ /// Title description of the availability status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title description of the availability status.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// Properties of availability state.
+ internal partial interface IAvailabilityStatusPropertiesInternal
+
+ {
+ ///
+ /// Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting
+ /// event
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Details of the availability status.
+ string DetailedStatus { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples
+ /// are Planned, Unplanned etc.
+ ///
+ string HealthEventCategory { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes where the health impacting event was originated. Examples are
+ /// PlatformInitiated, UserInitiated etc.
+ ///
+ string HealthEventCause { get; set; }
+ /// It is a unique Id that identifies the event
+ string HealthEventId { get; set; }
+ ///
+ /// In case of an availability impacting event, it describes when the health impacting event was originated. Examples are
+ /// Lifecycle, Downtime, Fault Analysis etc.
+ ///
+ string HealthEventType { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ global::System.DateTime? OccurredTime { get; set; }
+ /// Chronicity of the availability transition.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes? ReasonChronicity { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples
+ /// are planned, unplanned, user initiated or an outage etc.
+ ///
+ string ReasonType { get; set; }
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved RecentlyResolved { get; set; }
+ /// Timestamp when the availabilityState changes to Available.
+ global::System.DateTime? RecentlyResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ string RecentlyResolvedUnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ global::System.DateTime? RecentlyResolvedUnavailableOccurredTime { get; set; }
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction[] RecommendedAction { get; set; }
+ /// Timestamp for when the health was last checked.
+ global::System.DateTime? ReportedTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and
+ /// time for when the issue is expected to be resolved.
+ ///
+ global::System.DateTime? ResolutionEta { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was
+ /// received.
+ ///
+ global::System.DateTime? RootCauseAttributionTime { get; set; }
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent[] ServiceImpactingEvent { get; set; }
+ /// Summary description of the availability status.
+ string Summary { get; set; }
+ /// Title description of the availability status.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.json.cs
new file mode 100644
index 000000000000..5f1bc813a41a
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusProperties.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of availability state.
+ public partial class AvailabilityStatusProperties
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal AvailabilityStatusProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_recentlyResolved = If( json?.PropertyT("recentlyResolved"), out var __jsonRecentlyResolved) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.AvailabilityStatusPropertiesRecentlyResolved.FromJson(__jsonRecentlyResolved) : RecentlyResolved;}
+ {_availabilityState = If( json?.PropertyT("availabilityState"), out var __jsonAvailabilityState) ? (string)__jsonAvailabilityState : (string)AvailabilityState;}
+ {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;}
+ {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? (string)__jsonSummary : (string)Summary;}
+ {_detailedStatus = If( json?.PropertyT("detailedStatus"), out var __jsonDetailedStatus) ? (string)__jsonDetailedStatus : (string)DetailedStatus;}
+ {_reasonType = If( json?.PropertyT("reasonType"), out var __jsonReasonType) ? (string)__jsonReasonType : (string)ReasonType;}
+ {_rootCauseAttributionTime = If( json?.PropertyT("rootCauseAttributionTime"), out var __jsonRootCauseAttributionTime) ? global::System.DateTime.TryParse((string)__jsonRootCauseAttributionTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRootCauseAttributionTimeValue) ? __jsonRootCauseAttributionTimeValue : RootCauseAttributionTime : RootCauseAttributionTime;}
+ {_healthEventType = If( json?.PropertyT("healthEventType"), out var __jsonHealthEventType) ? (string)__jsonHealthEventType : (string)HealthEventType;}
+ {_healthEventCause = If( json?.PropertyT("healthEventCause"), out var __jsonHealthEventCause) ? (string)__jsonHealthEventCause : (string)HealthEventCause;}
+ {_healthEventCategory = If( json?.PropertyT("healthEventCategory"), out var __jsonHealthEventCategory) ? (string)__jsonHealthEventCategory : (string)HealthEventCategory;}
+ {_healthEventId = If( json?.PropertyT("healthEventId"), out var __jsonHealthEventId) ? (string)__jsonHealthEventId : (string)HealthEventId;}
+ {_resolutionEta = If( json?.PropertyT("resolutionETA"), out var __jsonResolutionEta) ? global::System.DateTime.TryParse((string)__jsonResolutionEta, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonResolutionEtaValue) ? __jsonResolutionEtaValue : ResolutionEta : ResolutionEta;}
+ {_occurredTime = If( json?.PropertyT("occurredTime"), out var __jsonOccurredTime) ? global::System.DateTime.TryParse((string)__jsonOccurredTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOccurredTimeValue) ? __jsonOccurredTimeValue : OccurredTime : OccurredTime;}
+ {_reasonChronicity = If( json?.PropertyT("reasonChronicity"), out var __jsonReasonChronicity) ? (string)__jsonReasonChronicity : (string)ReasonChronicity;}
+ {_reportedTime = If( json?.PropertyT("reportedTime"), out var __jsonReportedTime) ? global::System.DateTime.TryParse((string)__jsonReportedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonReportedTimeValue) ? __jsonReportedTimeValue : ReportedTime : ReportedTime;}
+ {_recommendedAction = If( json?.PropertyT("recommendedActions"), out var __jsonRecommendedActions) ? If( __jsonRecommendedActions as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction) (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.RecommendedAction.FromJson(__u) )) ))() : null : RecommendedAction;}
+ {_serviceImpactingEvent = If( json?.PropertyT("serviceImpactingEvents"), out var __jsonServiceImpactingEvents) ? If( __jsonServiceImpactingEvents as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent) (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEvent.FromJson(__p) )) ))() : null : ServiceImpactingEvent;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new AvailabilityStatusProperties(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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._recentlyResolved ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) this._recentlyResolved.ToJson(null,serializationMode) : null, "recentlyResolved" ,container.Add );
+ AddIf( null != (((object)this._availabilityState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._availabilityState.ToString()) : null, "availabilityState" ,container.Add );
+ AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add );
+ AddIf( null != (((object)this._summary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._summary.ToString()) : null, "summary" ,container.Add );
+ AddIf( null != (((object)this._detailedStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._detailedStatus.ToString()) : null, "detailedStatus" ,container.Add );
+ AddIf( null != (((object)this._reasonType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._reasonType.ToString()) : null, "reasonType" ,container.Add );
+ AddIf( null != this._rootCauseAttributionTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._rootCauseAttributionTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "rootCauseAttributionTime" ,container.Add );
+ AddIf( null != (((object)this._healthEventType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._healthEventType.ToString()) : null, "healthEventType" ,container.Add );
+ AddIf( null != (((object)this._healthEventCause)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._healthEventCause.ToString()) : null, "healthEventCause" ,container.Add );
+ AddIf( null != (((object)this._healthEventCategory)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._healthEventCategory.ToString()) : null, "healthEventCategory" ,container.Add );
+ AddIf( null != (((object)this._healthEventId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._healthEventId.ToString()) : null, "healthEventId" ,container.Add );
+ AddIf( null != this._resolutionEta ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._resolutionEta?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "resolutionETA" ,container.Add );
+ AddIf( null != this._occurredTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._occurredTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "occurredTime" ,container.Add );
+ AddIf( null != (((object)this._reasonChronicity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._reasonChronicity.ToString()) : null, "reasonChronicity" ,container.Add );
+ AddIf( null != this._reportedTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._reportedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "reportedTime" ,container.Add );
+ if (null != this._recommendedAction)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.XNodeArray();
+ foreach( var __x in this._recommendedAction )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("recommendedActions",__w);
+ }
+ if (null != this._serviceImpactingEvent)
+ {
+ var __r = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.XNodeArray();
+ foreach( var __s in this._serviceImpactingEvent )
+ {
+ AddIf(__s?.ToJson(null, serializationMode) ,__r.Add);
+ }
+ container.Add("serviceImpactingEvents",__r);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.PowerShell.cs
new file mode 100644
index 000000000000..a2b0bd81527f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.PowerShell.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusPropertiesRecentlyResolvedTypeConverter))]
+ public partial class AvailabilityStatusPropertiesRecentlyResolved
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AvailabilityStatusPropertiesRecentlyResolved(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("UnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("UnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).ResolvedTime = (global::System.DateTime?) content.GetValueForProperty("ResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).ResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("UnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailabilitySummary = (string) content.GetValueForProperty("UnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailabilitySummary, 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 AvailabilityStatusPropertiesRecentlyResolved(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("UnavailableOccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailableOccurredTime = (global::System.DateTime?) content.GetValueForProperty("UnavailableOccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailableOccurredTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("ResolvedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).ResolvedTime = (global::System.DateTime?) content.GetValueForProperty("ResolvedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).ResolvedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("UnavailabilitySummary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailabilitySummary = (string) content.GetValueForProperty("UnavailabilitySummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal)this).UnavailabilitySummary, 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.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AvailabilityStatusPropertiesRecentlyResolved(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AvailabilityStatusPropertiesRecentlyResolved(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.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ [System.ComponentModel.TypeConverter(typeof(AvailabilityStatusPropertiesRecentlyResolvedTypeConverter))]
+ public partial interface IAvailabilityStatusPropertiesRecentlyResolved
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.TypeConverter.cs
new file mode 100644
index 000000000000..9370cc3da886
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AvailabilityStatusPropertiesRecentlyResolvedTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AvailabilityStatusPropertiesRecentlyResolved.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusPropertiesRecentlyResolved.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AvailabilityStatusPropertiesRecentlyResolved.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.cs
new file mode 100644
index 000000000000..0c51a56ac3ab
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ public partial class AvailabilityStatusPropertiesRecentlyResolved :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolvedInternal
+ {
+
+ /// Backing field for property.
+ private global::System.DateTime? _resolvedTime;
+
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? ResolvedTime { get => this._resolvedTime; set => this._resolvedTime = value; }
+
+ /// Backing field for property.
+ private string _unavailabilitySummary;
+
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string UnavailabilitySummary { get => this._unavailabilitySummary; set => this._unavailabilitySummary = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _unavailableOccurredTime;
+
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? UnavailableOccurredTime { get => this._unavailableOccurredTime; set => this._unavailableOccurredTime = value; }
+
+ ///
+ /// Creates an new instance.
+ ///
+ public AvailabilityStatusPropertiesRecentlyResolved()
+ {
+
+ }
+ }
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ public partial interface IAvailabilityStatusPropertiesRecentlyResolved :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Timestamp when the availabilityState changes to Available.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp when the availabilityState changes to Available.",
+ SerializedName = @"resolvedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Brief description of cause of the resource becoming unavailable.",
+ SerializedName = @"unavailabilitySummary",
+ PossibleTypes = new [] { typeof(string) })]
+ string UnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the availabilityState changed to Unavailable",
+ SerializedName = @"unavailableOccurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? UnavailableOccurredTime { get; set; }
+
+ }
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ internal partial interface IAvailabilityStatusPropertiesRecentlyResolvedInternal
+
+ {
+ /// Timestamp when the availabilityState changes to Available.
+ global::System.DateTime? ResolvedTime { get; set; }
+ /// Brief description of cause of the resource becoming unavailable.
+ string UnavailabilitySummary { get; set; }
+ /// Timestamp for when the availabilityState changed to Unavailable
+ global::System.DateTime? UnavailableOccurredTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.json.cs
new file mode 100644
index 000000000000..8b4106b9ba49
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/AvailabilityStatusPropertiesRecentlyResolved.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
+ ///
+ public partial class AvailabilityStatusPropertiesRecentlyResolved
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal AvailabilityStatusPropertiesRecentlyResolved(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_unavailableOccurredTime = If( json?.PropertyT("unavailableOccurredTime"), out var __jsonUnavailableOccurredTime) ? global::System.DateTime.TryParse((string)__jsonUnavailableOccurredTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUnavailableOccurredTimeValue) ? __jsonUnavailableOccurredTimeValue : UnavailableOccurredTime : UnavailableOccurredTime;}
+ {_resolvedTime = If( json?.PropertyT("resolvedTime"), out var __jsonResolvedTime) ? global::System.DateTime.TryParse((string)__jsonResolvedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonResolvedTimeValue) ? __jsonResolvedTimeValue : ResolvedTime : ResolvedTime;}
+ {_unavailabilitySummary = If( json?.PropertyT("unavailabilitySummary"), out var __jsonUnavailabilitySummary) ? (string)__jsonUnavailabilitySummary : (string)UnavailabilitySummary;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatusPropertiesRecentlyResolved FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new AvailabilityStatusPropertiesRecentlyResolved(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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._unavailableOccurredTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._unavailableOccurredTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "unavailableOccurredTime" ,container.Add );
+ AddIf( null != this._resolvedTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._resolvedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "resolvedTime" ,container.Add );
+ AddIf( null != (((object)this._unavailabilitySummary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._unavailabilitySummary.ToString()) : null, "unavailabilitySummary" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..99252245ee2b
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.PowerShell.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Error details.
+ [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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Detail, 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 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.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal)this).Detail, 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.ResourceHealth.Models.Api20200501.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Error details.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial interface IErrorResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..15b1bedc46d0
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.cs
new file mode 100644
index 000000000000..c423de59b7db
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.cs
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Error details.
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal
+ {
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Code; }
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Detail; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError _error;
+
+ /// The error object.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseError()); set => this._error = value; }
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Code = value; }
+
+ /// Internal Acessors for Detail
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Detail = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ErrorResponseError()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)Error).Message = value; }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// Error details.
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(string) })]
+ string Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// Error details.
+ internal partial interface IErrorResponseInternal
+
+ {
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ string Detail { get; set; }
+ /// The error object.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError Error { get; set; }
+ /// The error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.json.cs
new file mode 100644
index 000000000000..ecd0a2a93edd
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponse.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Error details.
+ 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.ErrorResponseError.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.PowerShell.cs
new file mode 100644
index 000000000000..ea827e39fcf3
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// The error object.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseErrorTypeConverter))]
+ public partial class ErrorResponseError
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IErrorResponseError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorResponseError(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.ResourceHealth.Models.Api20200501.IErrorResponseError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorResponseError(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorResponseError(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.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Detail, 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 ErrorResponseError(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.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal)this).Detail, 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.ResourceHealth.Models.Api20200501.IErrorResponseError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The error object.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseErrorTypeConverter))]
+ public partial interface IErrorResponseError
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.TypeConverter.cs
new file mode 100644
index 000000000000..58a00f39399f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorResponseErrorTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IErrorResponseError ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorResponseError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorResponseError.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorResponseError.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.cs
new file mode 100644
index 000000000000..a41dec2d67ce
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// The error object.
+ public partial class ErrorResponseError :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private string _detail;
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Detail { get => this._detail; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Detail
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal.Detail { get => this._detail; set { {_detail = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseErrorInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Creates an new instance.
+ public ErrorResponseError()
+ {
+
+ }
+ }
+ /// The error object.
+ public partial interface IErrorResponseError :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(string) })]
+ string Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// The error object.
+ internal partial interface IErrorResponseErrorInternal
+
+ {
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ string Detail { get; set; }
+ /// The error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.json.cs
new file mode 100644
index 000000000000..23dfcf06397a
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ErrorResponseError.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// The error object.
+ public partial class ErrorResponseError
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponseError(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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;}
+ {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? (string)__jsonDetails : (string)Detail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IErrorResponseError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ErrorResponseError(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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._detail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._detail.ToString()) : null, "details" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.PowerShell.cs
new file mode 100644
index 000000000000..37119fd09f03
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.PowerShell.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Object of impacted region.
+ [System.ComponentModel.TypeConverter(typeof(ImpactedRegionTypeConverter))]
+ public partial class ImpactedRegion
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IImpactedRegion DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ImpactedRegion(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.ResourceHealth.Models.Api20200501.IImpactedRegion DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ImpactedRegion(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.ResourceHealth.Models.Api20200501.IImpactedRegion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ImpactedRegion(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.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)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 ImpactedRegion(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.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal)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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Object of impacted region.
+ [System.ComponentModel.TypeConverter(typeof(ImpactedRegionTypeConverter))]
+ public partial interface IImpactedRegion
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.TypeConverter.cs
new file mode 100644
index 000000000000..b36be3fac2da
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ImpactedRegionTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IImpactedRegion ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegion).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ImpactedRegion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ImpactedRegion.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ImpactedRegion.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.cs
new file mode 100644
index 000000000000..3dfa513f9a2f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Object of impacted region.
+ public partial class ImpactedRegion :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegion,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegionInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// The impacted region id.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The impacted region name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Creates an new instance.
+ public ImpactedRegion()
+ {
+
+ }
+ }
+ /// Object of impacted region.
+ public partial interface IImpactedRegion :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// The impacted region id.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The impacted region id.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// The impacted region name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The impacted region name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+
+ }
+ /// Object of impacted region.
+ internal partial interface IImpactedRegionInternal
+
+ {
+ /// The impacted region id.
+ string Id { get; set; }
+ /// The impacted region name.
+ string Name { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.json.cs
new file mode 100644
index 000000000000..b26fd3f5f8c0
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedRegion.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Object of impacted region.
+ public partial class ImpactedRegion
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegion.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedRegion FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ImpactedRegion(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ImpactedRegion(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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;}
+ {_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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.PowerShell.cs
new file mode 100644
index 000000000000..d40a80c39a4d
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.PowerShell.cs
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// impactedResource with health status
+ [System.ComponentModel.TypeConverter(typeof(ImpactedResourceStatusTypeConverter))]
+ public partial class ImpactedResourceStatus
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IImpactedResourceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ImpactedResourceStatus(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ImpactedResourceStatus(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ImpactedResourceStatus(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).ReasonType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues?) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).ReasonType, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues.CreateFrom);
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).OccurredTime, (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 ImpactedResourceStatus(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).ReasonType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues?) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).ReasonType, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues.CreateFrom);
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal)this).OccurredTime, (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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// impactedResource with health status
+ [System.ComponentModel.TypeConverter(typeof(ImpactedResourceStatusTypeConverter))]
+ public partial interface IImpactedResourceStatus
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.TypeConverter.cs
new file mode 100644
index 000000000000..eca75026ad0e
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ImpactedResourceStatusTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IImpactedResourceStatus ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatus).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ImpactedResourceStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ImpactedResourceStatus.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ImpactedResourceStatus.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.cs
new file mode 100644
index 000000000000..6fc6a5155fc0
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// impactedResource with health status
+ public partial class ImpactedResourceStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatus,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.Resource();
+
+ /// Impacted resource status of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).AvailabilityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).AvailabilityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues)""); }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Type = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusProperties()); set { {_property = value;} } }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Name; }
+
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public global::System.DateTime? OccurredTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).OccurredTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).OccurredTime = value ?? default(global::System.DateTime); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties _property;
+
+ /// Properties of impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusProperties()); set => this._property = value; }
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).ReasonType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).ReasonType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues)""); }
+
+ /// Summary description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Summary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).Summary = value ?? null; }
+
+ /// Title description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)Property).Title = value ?? null; }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public ImpactedResourceStatus()
+ {
+
+ }
+
+ /// 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.ResourceHealth.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// impactedResource with health status
+ public partial interface IImpactedResourceStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResource
+ {
+ /// Impacted resource status of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Impacted resource status of the resource.",
+ SerializedName = @"availabilityState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when last change in health status occurred.",
+ SerializedName = @"occurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? OccurredTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.",
+ SerializedName = @"reasonType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get; set; }
+ /// Summary description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Summary description of the impacted resource status.",
+ SerializedName = @"summary",
+ PossibleTypes = new [] { typeof(string) })]
+ string Summary { get; set; }
+ /// Title description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title description of the impacted resource status.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// impactedResource with health status
+ internal partial interface IImpactedResourceStatusInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.IResourceInternal
+ {
+ /// Impacted resource status of the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ global::System.DateTime? OccurredTime { get; set; }
+ /// Properties of impacted resource status.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties Property { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get; set; }
+ /// Summary description of the impacted resource status.
+ string Summary { get; set; }
+ /// Title description of the impacted resource status.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.json.cs
new file mode 100644
index 000000000000..f52b9982e54d
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatus.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// impactedResource with health status
+ public partial class ImpactedResourceStatus
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatus.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatus.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ImpactedResourceStatus(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ImpactedResourceStatus(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api10.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ImpactedResourceStatusProperties.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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.PowerShell.cs
new file mode 100644
index 000000000000..333dedf19304
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.PowerShell.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Properties of impacted resource status.
+ [System.ComponentModel.TypeConverter(typeof(ImpactedResourceStatusPropertiesTypeConverter))]
+ public partial class ImpactedResourceStatusProperties
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ImpactedResourceStatusProperties(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ImpactedResourceStatusProperties(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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ImpactedResourceStatusProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).ReasonType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues?) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).ReasonType, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues.CreateFrom);
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).OccurredTime, (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 ImpactedResourceStatusProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("AvailabilityState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).AvailabilityState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues?) content.GetValueForProperty("AvailabilityState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).AvailabilityState, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues.CreateFrom);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Summary"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).Summary, global::System.Convert.ToString);
+ }
+ if (content.Contains("ReasonType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).ReasonType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues?) content.GetValueForProperty("ReasonType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).ReasonType, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues.CreateFrom);
+ }
+ if (content.Contains("OccurredTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).OccurredTime = (global::System.DateTime?) content.GetValueForProperty("OccurredTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal)this).OccurredTime, (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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of impacted resource status.
+ [System.ComponentModel.TypeConverter(typeof(ImpactedResourceStatusPropertiesTypeConverter))]
+ public partial interface IImpactedResourceStatusProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.TypeConverter.cs
new file mode 100644
index 000000000000..1fa9b0ef9036
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ImpactedResourceStatusPropertiesTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ImpactedResourceStatusProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ImpactedResourceStatusProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ImpactedResourceStatusProperties.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.cs
new file mode 100644
index 000000000000..4a9d0352f8a8
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of impacted resource status.
+ public partial class ImpactedResourceStatusProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? _availabilityState;
+
+ /// Impacted resource status of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get => this._availabilityState; set => this._availabilityState = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _occurredTime;
+
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? OccurredTime { get => this._occurredTime; set => this._occurredTime = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? _reasonType;
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get => this._reasonType; set => this._reasonType = value; }
+
+ /// Backing field for property.
+ private string _summary;
+
+ /// Summary description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Summary { get => this._summary; set => this._summary = value; }
+
+ /// Backing field for property.
+ private string _title;
+
+ /// Title description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Title { get => this._title; set => this._title = value; }
+
+ /// Creates an new instance.
+ public ImpactedResourceStatusProperties()
+ {
+
+ }
+ }
+ /// Properties of impacted resource status.
+ public partial interface IImpactedResourceStatusProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Impacted resource status of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Impacted resource status of the resource.",
+ SerializedName = @"availabilityState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when last change in health status occurred.",
+ SerializedName = @"occurredTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? OccurredTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.",
+ SerializedName = @"reasonType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get; set; }
+ /// Summary description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Summary description of the impacted resource status.",
+ SerializedName = @"summary",
+ PossibleTypes = new [] { typeof(string) })]
+ string Summary { get; set; }
+ /// Title description of the impacted resource status.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title description of the impacted resource status.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// Properties of impacted resource status.
+ internal partial interface IImpactedResourceStatusPropertiesInternal
+
+ {
+ /// Impacted resource status of the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues? AvailabilityState { get; set; }
+ /// Timestamp for when last change in health status occurred.
+ global::System.DateTime? OccurredTime { get; set; }
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues? ReasonType { get; set; }
+ /// Summary description of the impacted resource status.
+ string Summary { get; set; }
+ /// Title description of the impacted resource status.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.json.cs
new file mode 100644
index 000000000000..5bb9ff73d7de
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ImpactedResourceStatusProperties.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of impacted resource status.
+ public partial class ImpactedResourceStatusProperties
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IImpactedResourceStatusProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ImpactedResourceStatusProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ImpactedResourceStatusProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_availabilityState = If( json?.PropertyT("availabilityState"), out var __jsonAvailabilityState) ? (string)__jsonAvailabilityState : (string)AvailabilityState;}
+ {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;}
+ {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? (string)__jsonSummary : (string)Summary;}
+ {_reasonType = If( json?.PropertyT("reasonType"), out var __jsonReasonType) ? (string)__jsonReasonType : (string)ReasonType;}
+ {_occurredTime = If( json?.PropertyT("occurredTime"), out var __jsonOccurredTime) ? global::System.DateTime.TryParse((string)__jsonOccurredTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOccurredTimeValue) ? __jsonOccurredTimeValue : OccurredTime : OccurredTime;}
+ 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._availabilityState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._availabilityState.ToString()) : null, "availabilityState" ,container.Add );
+ AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add );
+ AddIf( null != (((object)this._summary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._summary.ToString()) : null, "summary" ,container.Add );
+ AddIf( null != (((object)this._reasonType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._reasonType.ToString()) : null, "reasonType" ,container.Add );
+ AddIf( null != this._occurredTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._occurredTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "occurredTime" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.PowerShell.cs
new file mode 100644
index 000000000000..45ddc4c9f8af
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Operation available in the resourcehealth resource provider.
+ [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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Operation available in the resourcehealth resource provider.
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..0ba842618bbd
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.cs
new file mode 100644
index 000000000000..d5b0ce120026
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Operation available in the resourcehealth resource provider.
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay _display;
+
+ /// Properties of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplay()); set => this._display = value; }
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Description = value ?? null; }
+
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Operation = value ?? null; }
+
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Provider = value ?? null; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)Display).Resource = value ?? null; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationDisplay()); set { {_display = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Name of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// Operation available in the resourcehealth resource provider.
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Operation name.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource name.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+ /// Name of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Name of the operation.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+
+ }
+ /// Operation available in the resourcehealth resource provider.
+ internal partial interface IOperationInternal
+
+ {
+ /// Properties of the operation.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay Display { get; set; }
+ /// Description of the operation.
+ string DisplayDescription { get; set; }
+ /// Operation name.
+ string DisplayOperation { get; set; }
+ /// Provider name.
+ string DisplayProvider { get; set; }
+ /// Resource name.
+ string DisplayResource { get; set; }
+ /// Name of the operation.
+ string Name { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.json.cs
new file mode 100644
index 000000000000..c9212071a9af
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/Operation.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Operation available in the resourcehealth resource provider.
+ 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..bd8b771e5b68
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.PowerShell.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Properties of the 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of the operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..0a8a236e71f8
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.cs
new file mode 100644
index 000000000000..99fd2e932718
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of the operation.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// Properties of the operation.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Operation name.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource name.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ /// Properties of the operation.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ /// Description of the operation.
+ string Description { get; set; }
+ /// Operation name.
+ string Operation { get; set; }
+ /// Provider name.
+ string Provider { get; set; }
+ /// Resource name.
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.json.cs
new file mode 100644
index 000000000000..15c0b85fe267
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationDisplay.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of the 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.PowerShell.cs
new file mode 100644
index 000000000000..dd5f4a881806
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.PowerShell.cs
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Lists the operations response.
+ [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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationTypeConverter.ConvertFrom));
+ }
+ 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.ResourceHealth.Models.Api20200501.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.OperationTypeConverter.ConvertFrom));
+ }
+ 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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Lists the operations response.
+ [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))]
+ public partial interface IOperationListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.TypeConverter.cs
new file mode 100644
index 000000000000..fa1b7d334136
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IOperationListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.cs
new file mode 100644
index 000000000000..cedb92e5fad7
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Lists the operations response.
+ public partial class OperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResultInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[] _value;
+
+ /// List of operations available in the resourcehealth resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public OperationListResult()
+ {
+
+ }
+ }
+ /// Lists the operations response.
+ public partial interface IOperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// List of operations available in the resourcehealth resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"List of operations available in the resourcehealth resource provider.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[] Value { get; set; }
+
+ }
+ /// Lists the operations response.
+ internal partial interface IOperationListResultInternal
+
+ {
+ /// List of operations available in the resourcehealth resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.json.cs
new file mode 100644
index 000000000000..dbd8d9f1f313
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/OperationListResult.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Lists the operations response.
+ 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new OperationListResult(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.Operation.FromJson(__u) )) ))() : null : 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.PowerShell.cs
new file mode 100644
index 000000000000..6d53e509bc27
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(RecommendedActionTypeConverter))]
+ public partial class RecommendedAction
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IRecommendedAction DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new RecommendedAction(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.ResourceHealth.Models.Api20200501.IRecommendedAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new RecommendedAction(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.ResourceHealth.Models.Api20200501.IRecommendedAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal RecommendedAction(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.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).Action, global::System.Convert.ToString);
+ }
+ if (content.Contains("ActionUrl"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrl = (string) content.GetValueForProperty("ActionUrl",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrl, global::System.Convert.ToString);
+ }
+ if (content.Contains("ActionUrlText"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrlText = (string) content.GetValueForProperty("ActionUrlText",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrlText, 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 RecommendedAction(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.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).Action, global::System.Convert.ToString);
+ }
+ if (content.Contains("ActionUrl"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrl = (string) content.GetValueForProperty("ActionUrl",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrl, global::System.Convert.ToString);
+ }
+ if (content.Contains("ActionUrlText"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrlText = (string) content.GetValueForProperty("ActionUrlText",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal)this).ActionUrlText, 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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ [System.ComponentModel.TypeConverter(typeof(RecommendedActionTypeConverter))]
+ public partial interface IRecommendedAction
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.TypeConverter.cs
new file mode 100644
index 000000000000..545a8b70b178
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class RecommendedActionTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IRecommendedAction ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return RecommendedAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return RecommendedAction.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return RecommendedAction.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.cs
new file mode 100644
index 000000000000..e56ed6ca6805
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.cs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ public partial class RecommendedAction :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedActionInternal
+ {
+
+ /// Backing field for property.
+ private string _action;
+
+ /// Recommended action.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Action { get => this._action; set => this._action = value; }
+
+ /// Backing field for property.
+ private string _actionUrl;
+
+ /// Link to the action
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string ActionUrl { get => this._actionUrl; set => this._actionUrl = value; }
+
+ /// Backing field for property.
+ private string _actionUrlText;
+
+ /// Substring of action, it describes which text should host the action url.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string ActionUrlText { get => this._actionUrlText; set => this._actionUrlText = value; }
+
+ /// Creates an new instance.
+ public RecommendedAction()
+ {
+
+ }
+ }
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ public partial interface IRecommendedAction :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Recommended action.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Recommended action.",
+ SerializedName = @"action",
+ PossibleTypes = new [] { typeof(string) })]
+ string Action { get; set; }
+ /// Link to the action
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Link to the action",
+ SerializedName = @"actionUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string ActionUrl { get; set; }
+ /// Substring of action, it describes which text should host the action url.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Substring of action, it describes which text should host the action url.",
+ SerializedName = @"actionUrlText",
+ PossibleTypes = new [] { typeof(string) })]
+ string ActionUrlText { get; set; }
+
+ }
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ internal partial interface IRecommendedActionInternal
+
+ {
+ /// Recommended action.
+ string Action { get; set; }
+ /// Link to the action
+ string ActionUrl { get; set; }
+ /// Substring of action, it describes which text should host the action url.
+ string ActionUrlText { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.json.cs
new file mode 100644
index 000000000000..e3285d2922bd
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/RecommendedAction.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Lists actions the user can take based on the current availabilityState of the resource.
+ ///
+ public partial class RecommendedAction
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IRecommendedAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new RecommendedAction(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal RecommendedAction(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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;}
+ {_actionUrl = If( json?.PropertyT("actionUrl"), out var __jsonActionUrl) ? (string)__jsonActionUrl : (string)ActionUrl;}
+ {_actionUrlText = If( json?.PropertyT("actionUrlText"), out var __jsonActionUrlText) ? (string)__jsonActionUrlText : (string)ActionUrlText;}
+ 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._action.ToString()) : null, "action" ,container.Add );
+ AddIf( null != (((object)this._actionUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._actionUrl.ToString()) : null, "actionUrl" ,container.Add );
+ AddIf( null != (((object)this._actionUrlText)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._actionUrlText.ToString()) : null, "actionUrlText" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.PowerShell.cs
new file mode 100644
index 000000000000..d00ba2155492
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventTypeConverter))]
+ public partial class ServiceImpactingEvent
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IServiceImpactingEvent DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ServiceImpactingEvent(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.ResourceHealth.Models.Api20200501.IServiceImpactingEvent DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ServiceImpactingEvent(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.ResourceHealth.Models.Api20200501.IServiceImpactingEvent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ServiceImpactingEvent(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Status"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatusTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("IncidentProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties) content.GetValueForProperty("IncidentProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EventStartTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStartTime = (global::System.DateTime?) content.GetValueForProperty("EventStartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("EventStatusLastModifiedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStatusLastModifiedTime = (global::System.DateTime?) content.GetValueForProperty("EventStatusLastModifiedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStatusLastModifiedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CorrelationId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).CorrelationId, global::System.Convert.ToString);
+ }
+ if (content.Contains("StatusValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).StatusValue = (string) content.GetValueForProperty("StatusValue",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).StatusValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyTitle"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyTitle = (string) content.GetValueForProperty("IncidentPropertyTitle",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyTitle, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyService"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyService = (string) content.GetValueForProperty("IncidentPropertyService",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyService, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyRegion"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyRegion = (string) content.GetValueForProperty("IncidentPropertyRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyRegion, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyIncidentType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyIncidentType = (string) content.GetValueForProperty("IncidentPropertyIncidentType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyIncidentType, 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 ServiceImpactingEvent(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Status"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatusTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("IncidentProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties) content.GetValueForProperty("IncidentProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EventStartTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStartTime = (global::System.DateTime?) content.GetValueForProperty("EventStartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("EventStatusLastModifiedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStatusLastModifiedTime = (global::System.DateTime?) content.GetValueForProperty("EventStatusLastModifiedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).EventStatusLastModifiedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CorrelationId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).CorrelationId = (string) content.GetValueForProperty("CorrelationId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).CorrelationId, global::System.Convert.ToString);
+ }
+ if (content.Contains("StatusValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).StatusValue = (string) content.GetValueForProperty("StatusValue",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).StatusValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyTitle"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyTitle = (string) content.GetValueForProperty("IncidentPropertyTitle",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyTitle, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyService"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyService = (string) content.GetValueForProperty("IncidentPropertyService",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyService, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyRegion"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyRegion = (string) content.GetValueForProperty("IncidentPropertyRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyRegion, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentPropertyIncidentType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyIncidentType = (string) content.GetValueForProperty("IncidentPropertyIncidentType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal)this).IncidentPropertyIncidentType, 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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventTypeConverter))]
+ public partial interface IServiceImpactingEvent
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.TypeConverter.cs
new file mode 100644
index 000000000000..43638f8693d9
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ServiceImpactingEventTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IServiceImpactingEvent ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ServiceImpactingEvent.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEvent.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEvent.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.cs
new file mode 100644
index 000000000000..817c176a2fc1
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.cs
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ public partial class ServiceImpactingEvent :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal
+ {
+
+ /// Backing field for property.
+ private string _correlationId;
+
+ /// Correlation id for the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string CorrelationId { get => this._correlationId; set => this._correlationId = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _eventStartTime;
+
+ /// Timestamp for when the event started.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? EventStartTime { get => this._eventStartTime; set => this._eventStartTime = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _eventStatusLastModifiedTime;
+
+ /// Timestamp for when event was submitted/detected.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? EventStatusLastModifiedTime { get => this._eventStatusLastModifiedTime; set => this._eventStatusLastModifiedTime = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties _incidentProperty;
+
+ /// Properties of the service impacting event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties IncidentProperty { get => (this._incidentProperty = this._incidentProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentProperties()); set => this._incidentProperty = value; }
+
+ /// Type of Event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string IncidentPropertyIncidentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).IncidentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).IncidentType = value ?? null; }
+
+ /// Region impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string IncidentPropertyRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Region; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Region = value ?? null; }
+
+ /// Service impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string IncidentPropertyService { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Service; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Service = value ?? null; }
+
+ /// Title of the incident.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string IncidentPropertyTitle { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)IncidentProperty).Title = value ?? null; }
+
+ /// Internal Acessors for IncidentProperty
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal.IncidentProperty { get => (this._incidentProperty = this._incidentProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentProperties()); set { {_incidentProperty = value;} } }
+
+ /// Internal Acessors for Status
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventInternal.Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatus()); set { {_status = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus _status;
+
+ /// Status of the service impacting event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus Status { get => (this._status = this._status ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatus()); set => this._status = value; }
+
+ /// Current status of the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Inlined)]
+ public string StatusValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)Status).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)Status).Value = value ?? null; }
+
+ /// Creates an new instance.
+ public ServiceImpactingEvent()
+ {
+
+ }
+ }
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ public partial interface IServiceImpactingEvent :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Correlation id for the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Correlation id for the event",
+ SerializedName = @"correlationId",
+ PossibleTypes = new [] { typeof(string) })]
+ string CorrelationId { get; set; }
+ /// Timestamp for when the event started.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when the event started.",
+ SerializedName = @"eventStartTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? EventStartTime { get; set; }
+ /// Timestamp for when event was submitted/detected.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp for when event was submitted/detected.",
+ SerializedName = @"eventStatusLastModifiedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? EventStatusLastModifiedTime { get; set; }
+ /// Type of Event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of Event.",
+ SerializedName = @"incidentType",
+ PossibleTypes = new [] { typeof(string) })]
+ string IncidentPropertyIncidentType { get; set; }
+ /// Region impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Region impacted by the event.",
+ SerializedName = @"region",
+ PossibleTypes = new [] { typeof(string) })]
+ string IncidentPropertyRegion { get; set; }
+ /// Service impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service impacted by the event.",
+ SerializedName = @"service",
+ PossibleTypes = new [] { typeof(string) })]
+ string IncidentPropertyService { get; set; }
+ /// Title of the incident.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title of the incident.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string IncidentPropertyTitle { get; set; }
+ /// Current status of the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current status of the event",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string StatusValue { get; set; }
+
+ }
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ internal partial interface IServiceImpactingEventInternal
+
+ {
+ /// Correlation id for the event
+ string CorrelationId { get; set; }
+ /// Timestamp for when the event started.
+ global::System.DateTime? EventStartTime { get; set; }
+ /// Timestamp for when event was submitted/detected.
+ global::System.DateTime? EventStatusLastModifiedTime { get; set; }
+ /// Properties of the service impacting event.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties IncidentProperty { get; set; }
+ /// Type of Event.
+ string IncidentPropertyIncidentType { get; set; }
+ /// Region impacted by the event.
+ string IncidentPropertyRegion { get; set; }
+ /// Service impacted by the event.
+ string IncidentPropertyService { get; set; }
+ /// Title of the incident.
+ string IncidentPropertyTitle { get; set; }
+ /// Status of the service impacting event.
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus Status { get; set; }
+ /// Current status of the event
+ string StatusValue { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.json.cs
new file mode 100644
index 000000000000..afe3a8a0611f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEvent.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ ///
+ /// Lists the service impacting events that may be affecting the health of the resource.
+ ///
+ public partial class ServiceImpactingEvent
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEvent FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ServiceImpactingEvent(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ServiceImpactingEvent(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventStatus.FromJson(__jsonStatus) : Status;}
+ {_incidentProperty = If( json?.PropertyT("incidentProperties"), out var __jsonIncidentProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.ServiceImpactingEventIncidentProperties.FromJson(__jsonIncidentProperties) : IncidentProperty;}
+ {_eventStartTime = If( json?.PropertyT("eventStartTime"), out var __jsonEventStartTime) ? global::System.DateTime.TryParse((string)__jsonEventStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEventStartTimeValue) ? __jsonEventStartTimeValue : EventStartTime : EventStartTime;}
+ {_eventStatusLastModifiedTime = If( json?.PropertyT("eventStatusLastModifiedTime"), out var __jsonEventStatusLastModifiedTime) ? global::System.DateTime.TryParse((string)__jsonEventStatusLastModifiedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEventStatusLastModifiedTimeValue) ? __jsonEventStatusLastModifiedTimeValue : EventStatusLastModifiedTime : EventStatusLastModifiedTime;}
+ {_correlationId = If( json?.PropertyT("correlationId"), out var __jsonCorrelationId) ? (string)__jsonCorrelationId : (string)CorrelationId;}
+ 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._status ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) this._status.ToJson(null,serializationMode) : null, "status" ,container.Add );
+ AddIf( null != this._incidentProperty ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) this._incidentProperty.ToJson(null,serializationMode) : null, "incidentProperties" ,container.Add );
+ AddIf( null != this._eventStartTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._eventStartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "eventStartTime" ,container.Add );
+ AddIf( null != this._eventStatusLastModifiedTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._eventStatusLastModifiedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "eventStatusLastModifiedTime" ,container.Add );
+ AddIf( null != (((object)this._correlationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._correlationId.ToString()) : null, "correlationId" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.PowerShell.cs
new file mode 100644
index 000000000000..98eb67112231
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.PowerShell.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.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Properties of the service impacting event.
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventIncidentPropertiesTypeConverter))]
+ public partial class ServiceImpactingEventIncidentProperties
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ServiceImpactingEventIncidentProperties(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ServiceImpactingEventIncidentProperties(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ServiceImpactingEventIncidentProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Service"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Service = (string) content.GetValueForProperty("Service",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Service, global::System.Convert.ToString);
+ }
+ if (content.Contains("Region"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Region, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).IncidentType = (string) content.GetValueForProperty("IncidentType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).IncidentType, 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 ServiceImpactingEventIncidentProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Service"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Service = (string) content.GetValueForProperty("Service",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Service, global::System.Convert.ToString);
+ }
+ if (content.Contains("Region"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).Region, global::System.Convert.ToString);
+ }
+ if (content.Contains("IncidentType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).IncidentType = (string) content.GetValueForProperty("IncidentType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal)this).IncidentType, 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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of the service impacting event.
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventIncidentPropertiesTypeConverter))]
+ public partial interface IServiceImpactingEventIncidentProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.TypeConverter.cs
new file mode 100644
index 000000000000..db07b1e8fc55
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ServiceImpactingEventIncidentPropertiesTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ServiceImpactingEventIncidentProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEventIncidentProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEventIncidentProperties.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.cs
new file mode 100644
index 000000000000..4e930923309c
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of the service impacting event.
+ public partial class ServiceImpactingEventIncidentProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _incidentType;
+
+ /// Type of Event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string IncidentType { get => this._incidentType; set => this._incidentType = value; }
+
+ /// Backing field for property.
+ private string _region;
+
+ /// Region impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Region { get => this._region; set => this._region = value; }
+
+ /// Backing field for property.
+ private string _service;
+
+ /// Service impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Service { get => this._service; set => this._service = value; }
+
+ /// Backing field for property.
+ private string _title;
+
+ /// Title of the incident.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Title { get => this._title; set => this._title = value; }
+
+ /// Creates an new instance.
+ public ServiceImpactingEventIncidentProperties()
+ {
+
+ }
+ }
+ /// Properties of the service impacting event.
+ public partial interface IServiceImpactingEventIncidentProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Type of Event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of Event.",
+ SerializedName = @"incidentType",
+ PossibleTypes = new [] { typeof(string) })]
+ string IncidentType { get; set; }
+ /// Region impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Region impacted by the event.",
+ SerializedName = @"region",
+ PossibleTypes = new [] { typeof(string) })]
+ string Region { get; set; }
+ /// Service impacted by the event.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service impacted by the event.",
+ SerializedName = @"service",
+ PossibleTypes = new [] { typeof(string) })]
+ string Service { get; set; }
+ /// Title of the incident.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Title of the incident.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// Properties of the service impacting event.
+ internal partial interface IServiceImpactingEventIncidentPropertiesInternal
+
+ {
+ /// Type of Event.
+ string IncidentType { get; set; }
+ /// Region impacted by the event.
+ string Region { get; set; }
+ /// Service impacted by the event.
+ string Service { get; set; }
+ /// Title of the incident.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.json.cs
new file mode 100644
index 000000000000..3f0fcddc3a14
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventIncidentProperties.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Properties of the service impacting event.
+ public partial class ServiceImpactingEventIncidentProperties
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventIncidentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ServiceImpactingEventIncidentProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ServiceImpactingEventIncidentProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;}
+ {_service = If( json?.PropertyT("service"), out var __jsonService) ? (string)__jsonService : (string)Service;}
+ {_region = If( json?.PropertyT("region"), out var __jsonRegion) ? (string)__jsonRegion : (string)Region;}
+ {_incidentType = If( json?.PropertyT("incidentType"), out var __jsonIncidentType) ? (string)__jsonIncidentType : (string)IncidentType;}
+ 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add );
+ AddIf( null != (((object)this._service)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._service.ToString()) : null, "service" ,container.Add );
+ AddIf( null != (((object)this._region)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._region.ToString()) : null, "region" ,container.Add );
+ AddIf( null != (((object)this._incidentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._incidentType.ToString()) : null, "incidentType" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.PowerShell.cs
new file mode 100644
index 000000000000..91c1cec45566
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.PowerShell.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Status of the service impacting event.
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventStatusTypeConverter))]
+ public partial class ServiceImpactingEventStatus
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ServiceImpactingEventStatus(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ServiceImpactingEventStatus(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ServiceImpactingEventStatus(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)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 ServiceImpactingEventStatus(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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal)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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Status of the service impacting event.
+ [System.ComponentModel.TypeConverter(typeof(ServiceImpactingEventStatusTypeConverter))]
+ public partial interface IServiceImpactingEventStatus
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.TypeConverter.cs
new file mode 100644
index 000000000000..b0d289895b40
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ServiceImpactingEventStatusTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ServiceImpactingEventStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEventStatus.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ServiceImpactingEventStatus.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.cs
new file mode 100644
index 000000000000..ecfc5195b393
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Status of the service impacting event.
+ public partial class ServiceImpactingEventStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatusInternal
+ {
+
+ /// Backing field for property.
+ private string _value;
+
+ /// Current status of the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public ServiceImpactingEventStatus()
+ {
+
+ }
+ }
+ /// Status of the service impacting event.
+ public partial interface IServiceImpactingEventStatus :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Current status of the event
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current status of the event",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string Value { get; set; }
+
+ }
+ /// Status of the service impacting event.
+ internal partial interface IServiceImpactingEventStatusInternal
+
+ {
+ /// Current status of the event
+ string Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.json.cs
new file mode 100644
index 000000000000..d539d7c874a6
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/ServiceImpactingEventStatus.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Status of the service impacting event.
+ public partial class ServiceImpactingEventStatus
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IServiceImpactingEventStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ServiceImpactingEventStatus(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ServiceImpactingEventStatus(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.PowerShell.cs
new file mode 100644
index 000000000000..1f8300a0ba67
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.PowerShell.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ /// Banner type of emerging issue.
+ [System.ComponentModel.TypeConverter(typeof(StatusBannerTypeConverter))]
+ public partial class StatusBanner
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.IStatusBanner DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new StatusBanner(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.ResourceHealth.Models.Api20200501.IStatusBanner DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new StatusBanner(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.ResourceHealth.Models.Api20200501.IStatusBanner FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal StatusBanner(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Cloud"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Cloud = (string) content.GetValueForProperty("Cloud",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Cloud, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).LastModifiedTime = (global::System.DateTime?) content.GetValueForProperty("LastModifiedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).LastModifiedTime, (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 StatusBanner(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Cloud"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Cloud = (string) content.GetValueForProperty("Cloud",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).Cloud, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).LastModifiedTime = (global::System.DateTime?) content.GetValueForProperty("LastModifiedTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal)this).LastModifiedTime, (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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Banner type of emerging issue.
+ [System.ComponentModel.TypeConverter(typeof(StatusBannerTypeConverter))]
+ public partial interface IStatusBanner
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.TypeConverter.cs
new file mode 100644
index 000000000000..87e6f382da05
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.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.ResourceHealth.Models.Api20200501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class StatusBannerTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.IStatusBanner ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBanner).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return StatusBanner.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return StatusBanner.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return StatusBanner.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/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.cs
new file mode 100644
index 000000000000..f125eb7c81e2
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Banner type of emerging issue.
+ public partial class StatusBanner :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBanner,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBannerInternal
+ {
+
+ /// Backing field for property.
+ private string _cloud;
+
+ /// The cloud type of this banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Cloud { get => this._cloud; set => this._cloud = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _lastModifiedTime;
+
+ /// The last time modified on this banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public global::System.DateTime? LastModifiedTime { get => this._lastModifiedTime; set => this._lastModifiedTime = value; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// The details of banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Message { get => this._message; set => this._message = value; }
+
+ /// Backing field for property.
+ private string _title;
+
+ /// The banner title.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Title { get => this._title; set => this._title = value; }
+
+ /// Creates an new instance.
+ public StatusBanner()
+ {
+
+ }
+ }
+ /// Banner type of emerging issue.
+ public partial interface IStatusBanner :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// The cloud type of this banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The cloud type of this banner.",
+ SerializedName = @"cloud",
+ PossibleTypes = new [] { typeof(string) })]
+ string Cloud { get; set; }
+ /// The last time modified on this banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The last time modified on this banner.",
+ SerializedName = @"lastModifiedTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? LastModifiedTime { get; set; }
+ /// The details of banner.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The details of banner.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+ /// The banner title.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The banner title.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// Banner type of emerging issue.
+ internal partial interface IStatusBannerInternal
+
+ {
+ /// The cloud type of this banner.
+ string Cloud { get; set; }
+ /// The last time modified on this banner.
+ global::System.DateTime? LastModifiedTime { get; set; }
+ /// The details of banner.
+ string Message { get; set; }
+ /// The banner title.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.json.cs b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.json.cs
new file mode 100644
index 000000000000..2001f8386233
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/Api20200501/StatusBanner.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.ResourceHealth.Models.Api20200501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ /// Banner type of emerging issue.
+ public partial class StatusBanner
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBanner.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBanner.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IStatusBanner FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new StatusBanner(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal StatusBanner(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ {_cloud = If( json?.PropertyT("cloud"), out var __jsonCloud) ? (string)__jsonCloud : (string)Cloud;}
+ {_lastModifiedTime = If( json?.PropertyT("lastModifiedTime"), out var __jsonLastModifiedTime) ? global::System.DateTime.TryParse((string)__jsonLastModifiedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedTimeValue) ? __jsonLastModifiedTimeValue : LastModifiedTime : LastModifiedTime;}
+ 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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add );
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ AddIf( null != (((object)this._cloud)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._cloud.ToString()) : null, "cloud" ,container.Add );
+ AddIf( null != this._lastModifiedTime ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._lastModifiedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedTime" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.PowerShell.cs b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.PowerShell.cs
new file mode 100644
index 000000000000..c3a39e3de6fc
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.PowerShell.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.ResourceHealth.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(ResourceHealthIdentityTypeConverter))]
+ public partial class ResourceHealthIdentity
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ResourceHealth.Models.IResourceHealthIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ResourceHealthIdentity(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.ResourceHealth.Models.IResourceHealthIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ResourceHealthIdentity(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.ResourceHealth.Models.IResourceHealthIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ResourceHealthIdentity(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.ResourceHealth.Models.IResourceHealthIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceUri = (string) content.GetValueForProperty("ResourceUri",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)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 ResourceHealthIdentity(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.ResourceHealth.Models.IResourceHealthIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceUri = (string) content.GetValueForProperty("ResourceUri",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).ResourceUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal)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.ResourceHealth.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ResourceHealthIdentityTypeConverter))]
+ public partial interface IResourceHealthIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..7d598f2d70be
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.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.ResourceHealth.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ResourceHealthIdentityTypeConverter : 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.ResourceHealth.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.IResourceHealthIdentity 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 ResourceHealthIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ResourceHealthIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ResourceHealthIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ResourceHealthIdentity.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/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.cs b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.cs
new file mode 100644
index 000000000000..4bb428b7cb19
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.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.ResourceHealth.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ public partial class ResourceHealthIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The name of the resource group.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string _resourceUri;
+
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested
+ /// and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string ResourceUri { get => this._resourceUri; set => this._resourceUri = value; }
+
+ /// Backing field for property.
+ private string _subscriptionId;
+
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI
+ /// for every service call.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.PropertyOrigin.Owned)]
+ public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ /// Creates an new instance.
+ public ResourceHealthIdentity()
+ {
+
+ }
+ }
+ public partial interface IResourceHealthIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IJsonSerializable
+ {
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// The name of the resource group.
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the resource group.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceGroupName { get; set; }
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested
+ /// and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}",
+ SerializedName = @"resourceUri",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceUri { get; set; }
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI
+ /// for every service call.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SubscriptionId { get; set; }
+
+ }
+ internal partial interface IResourceHealthIdentityInternal
+
+ {
+ /// Resource identity path
+ string Id { get; set; }
+ /// The name of the resource group.
+ string ResourceGroupName { get; set; }
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested
+ /// and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ///
+ string ResourceUri { get; set; }
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI
+ /// for every service call.
+ ///
+ string SubscriptionId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.json.cs b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.json.cs
new file mode 100644
index 000000000000..9ba110366f52
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Models/ResourceHealthIdentity.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.ResourceHealth.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+
+ public partial class ResourceHealthIdentity
+ {
+
+ ///
+ /// 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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject json ? new ResourceHealthIdentity(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject instance to deserialize from.
+ internal ResourceHealthIdentity(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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;}
+ {_resourceUri = If( json?.PropertyT("resourceUri"), out var __jsonResourceUri) ? (string)__jsonResourceUri : (string)ResourceUri;}
+ {_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.ResourceHealth.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
+ AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add );
+ AddIf( null != (((object)this._resourceUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._resourceUri.ToString()) : null, "resourceUri" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.Completer.cs b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.Completer.cs
new file mode 100644
index 000000000000..c9d58a1919f0
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.Completer.cs
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support
+{
+
+ /// Impacted resource status of the resource.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValuesTypeConverter))]
+ public partial struct AvailabilityStateValues :
+ System.Management.Automation.IArgumentCompleter
+ {
+
+ ///
+ /// Implementations of this function are called by PowerShell to complete arguments.
+ ///
+ /// The name of the command that needs argument completion.
+ /// The name of the parameter that needs argument completion.
+ /// The (possibly empty) word being completed.
+ /// The command ast in case it is needed for completion.
+ /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
+ /// or will not attempt to evaluate an argument, in which case you may need to use commandAst.
+ ///
+ /// A collection of completion results, most like with ResultType set to ParameterValue.
+ ///
+ public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
+ {
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unavailable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Unavailable'", "Unavailable", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unavailable");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Degraded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Degraded'", "Degraded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Degraded");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.TypeConverter.cs
new file mode 100644
index 000000000000..9fb151d47924
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.TypeConverter.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.ResourceHealth.Support
+{
+
+ /// Impacted resource status of the resource.
+ public partial class AvailabilityStateValuesTypeConverter :
+ 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) => true;
+
+ ///
+ /// 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 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) => AvailabilityStateValues.CreateFrom(sourceValue);
+
+ /// 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/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.cs b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.cs
new file mode 100644
index 000000000000..da8a2d3e94b4
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/AvailabilityStateValues.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.ResourceHealth.Support
+{
+
+ /// Impacted resource status of the resource.
+ public partial struct AvailabilityStateValues :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues Available = @"Available";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues Degraded = @"Degraded";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues Unavailable = @"Unavailable";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues Unknown = @"Unknown";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Creates an instance of the Enum class.
+ /// the value to create an instance for.
+ private AvailabilityStateValues(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Conversion from arbitrary object to AvailabilityStateValues
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new AvailabilityStateValues(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type AvailabilityStateValues
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type AvailabilityStateValues (override for Object)
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public override bool Equals(object obj)
+ {
+ return obj is AvailabilityStateValues && Equals((AvailabilityStateValues)obj);
+ }
+
+ /// Returns hashCode for enum AvailabilityStateValues
+ /// The hashCode of the value
+ public override int GetHashCode()
+ {
+ return this._value.GetHashCode();
+ }
+
+ /// Returns string representation for AvailabilityStateValues
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to AvailabilityStateValues
+ /// the value to convert to an instance of .
+
+ public static implicit operator AvailabilityStateValues(string value)
+ {
+ return new AvailabilityStateValues(value);
+ }
+
+ /// Implicit operator to convert AvailabilityStateValues to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum AvailabilityStateValues
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are not equal to the same value
+ public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum AvailabilityStateValues
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are equal to the same value
+ public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.AvailabilityStateValues e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.Completer.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.Completer.cs
new file mode 100644
index 000000000000..50de11835872
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.Completer.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.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support
+{
+
+ /// Chronicity of the availability transition.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypesTypeConverter))]
+ public partial struct ReasonChronicityTypes :
+ System.Management.Automation.IArgumentCompleter
+ {
+
+ ///
+ /// Implementations of this function are called by PowerShell to complete arguments.
+ ///
+ /// The name of the command that needs argument completion.
+ /// The name of the parameter that needs argument completion.
+ /// The (possibly empty) word being completed.
+ /// The command ast in case it is needed for completion.
+ /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
+ /// or will not attempt to evaluate an argument, in which case you may need to use commandAst.
+ ///
+ /// A collection of completion results, most like with ResultType set to ParameterValue.
+ ///
+ public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
+ {
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Transient".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Transient'", "Transient", global::System.Management.Automation.CompletionResultType.ParameterValue, "Transient");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Persistent".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Persistent'", "Persistent", global::System.Management.Automation.CompletionResultType.ParameterValue, "Persistent");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.TypeConverter.cs
new file mode 100644
index 000000000000..ae4598981c8a
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.TypeConverter.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.ResourceHealth.Support
+{
+
+ /// Chronicity of the availability transition.
+ public partial class ReasonChronicityTypesTypeConverter :
+ 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) => true;
+
+ ///
+ /// 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 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) => ReasonChronicityTypes.CreateFrom(sourceValue);
+
+ /// 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/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.cs
new file mode 100644
index 000000000000..ca605f824303
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonChronicityTypes.cs
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support
+{
+
+ /// Chronicity of the availability transition.
+ public partial struct ReasonChronicityTypes :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes Persistent = @"Persistent";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes Transient = @"Transient";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to ReasonChronicityTypes
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new ReasonChronicityTypes(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type ReasonChronicityTypes
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type ReasonChronicityTypes (override for Object)
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public override bool Equals(object obj)
+ {
+ return obj is ReasonChronicityTypes && Equals((ReasonChronicityTypes)obj);
+ }
+
+ /// Returns hashCode for enum ReasonChronicityTypes
+ /// The hashCode of the value
+ public override int GetHashCode()
+ {
+ return this._value.GetHashCode();
+ }
+
+ /// Creates an instance of the Enum class.
+ /// the value to create an instance for.
+ private ReasonChronicityTypes(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for ReasonChronicityTypes
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to ReasonChronicityTypes
+ /// the value to convert to an instance of .
+
+ public static implicit operator ReasonChronicityTypes(string value)
+ {
+ return new ReasonChronicityTypes(value);
+ }
+
+ /// Implicit operator to convert ReasonChronicityTypes to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum ReasonChronicityTypes
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are not equal to the same value
+ public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum ReasonChronicityTypes
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are equal to the same value
+ public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonChronicityTypes e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.Completer.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.Completer.cs
new file mode 100644
index 000000000000..2d7f13e0fff1
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.Completer.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.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support
+{
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValuesTypeConverter))]
+ public partial struct ReasonTypeValues :
+ System.Management.Automation.IArgumentCompleter
+ {
+
+ ///
+ /// Implementations of this function are called by PowerShell to complete arguments.
+ ///
+ /// The name of the command that needs argument completion.
+ /// The name of the parameter that needs argument completion.
+ /// The (possibly empty) word being completed.
+ /// The command ast in case it is needed for completion.
+ /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
+ /// or will not attempt to evaluate an argument, in which case you may need to use commandAst.
+ ///
+ /// A collection of completion results, most like with ResultType set to ParameterValue.
+ ///
+ public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
+ {
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unplanned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Unplanned'", "Unplanned", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unplanned");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Planned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Planned'", "Planned", global::System.Management.Automation.CompletionResultType.ParameterValue, "Planned");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserInitiated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'UserInitiated'", "UserInitiated", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserInitiated");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.TypeConverter.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.TypeConverter.cs
new file mode 100644
index 000000000000..69799a75a883
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.TypeConverter.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.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support
+{
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ public partial class ReasonTypeValuesTypeConverter :
+ 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) => true;
+
+ ///
+ /// 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 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) => ReasonTypeValues.CreateFrom(sourceValue);
+
+ /// 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/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.cs b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.cs
new file mode 100644
index 000000000000..00f7f6bbae82
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/api/Support/ReasonTypeValues.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.ResourceHealth.Support
+{
+
+ ///
+ /// When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
+ ///
+ public partial struct ReasonTypeValues :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues Planned = @"Planned";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues Unplanned = @"Unplanned";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues UserInitiated = @"UserInitiated";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to ReasonTypeValues
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new ReasonTypeValues(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type ReasonTypeValues
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type ReasonTypeValues (override for Object)
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public override bool Equals(object obj)
+ {
+ return obj is ReasonTypeValues && Equals((ReasonTypeValues)obj);
+ }
+
+ /// Returns hashCode for enum ReasonTypeValues
+ /// The hashCode of the value
+ public override int GetHashCode()
+ {
+ return this._value.GetHashCode();
+ }
+
+ /// Creates an instance of the Enum class.
+ /// the value to create an instance for.
+ private ReasonTypeValues(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for ReasonTypeValues
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to ReasonTypeValues
+ /// the value to convert to an instance of .
+
+ public static implicit operator ReasonTypeValues(string value)
+ {
+ return new ReasonTypeValues(value);
+ }
+
+ /// Implicit operator to convert ReasonTypeValues to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum ReasonTypeValues
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are not equal to the same value
+ public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum ReasonTypeValues
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are equal to the same value
+ public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Support.ReasonTypeValues e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_Get.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_Get.cs
new file mode 100644
index 000000000000..74c614fd36ce
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_Get.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.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ /// Gets current availability status for a single resource
+ ///
+ /// [OpenAPI] GetByResource=>GET:"/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthAvailabilityStatuses_Get")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Gets current availability status for a single resource")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthAvailabilityStatuses_Get : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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();
+
+ /// 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.ClientAPI;
+
+ ///
+ /// The credentials, account, tenant, and subscription used for communication with Azure
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
+ [global::System.Management.Automation.ValidateNotNull]
+ [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Azure)]
+ public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
+
+ /// Backing field for property.
+ private string _expand;
+
+ ///
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting $expand=recommendedactions in url query expands the recommendedactions in the response.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Setting $expand=recommendedactions in url query expands the recommendedactions in the response.",
+ SerializedName = @"$expand",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Expand { get => this._expand; set => this._expand = value; }
+
+ /// Backing field for property.
+ private string _filter;
+
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN",
+ SerializedName = @"$filter",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Filter { get => this._filter; set => this._filter = 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
+
+ /// Backing field for property.
+ private string _resourceUri;
+
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested
+ /// and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}",
+ SerializedName = @"resourceUri",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Path)]
+ public string ResourceUri { get => this._resourceUri; set => this._resourceUri = 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ /// 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.ResourceHealth.Module.Instance.GetTelemetryId.Invoke();
+ if (telemetryId != "" && telemetryId != "internal")
+ {
+ __correlationId = telemetryId;
+ }
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzResourceHealthAvailabilityStatuses_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.ResourceHealth.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.ResourceHealth.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data.Message, new string[]{});
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 ;
+ }
+ }
+ await Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesGetByResource(ResourceUri, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.UndeclaredResponseException urexception)
+ {
+ WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceUri=ResourceUri,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Cancel();
+ base.StopProcessing();
+ }
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.RestException(responseMessage, await response);
+ WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceUri=ResourceUri, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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 { ResourceUri=ResourceUri, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ /// 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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ WriteObject((await response));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_GetViaIdentity.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_GetViaIdentity.cs
new file mode 100644
index 000000000000..caf1c26fc567
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_GetViaIdentity.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.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ /// Gets current availability status for a single resource
+ ///
+ /// [OpenAPI] GetByResource=>GET:"/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthAvailabilityStatuses_GetViaIdentity")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Gets current availability status for a single resource")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthAvailabilityStatuses_GetViaIdentity : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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();
+
+ /// 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.ClientAPI;
+
+ ///
+ /// The credentials, account, tenant, and subscription used for communication with Azure
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
+ [global::System.Management.Automation.ValidateNotNull]
+ [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Azure)]
+ public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
+
+ /// Backing field for property.
+ private string _expand;
+
+ ///
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting $expand=recommendedactions in url query expands the recommendedactions in the response.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Setting $expand=recommendedactions in url query expands the recommendedactions in the response.",
+ SerializedName = @"$expand",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Expand { get => this._expand; set => this._expand = value; }
+
+ /// Backing field for property.
+ private string _filter;
+
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN",
+ SerializedName = @"$filter",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Filter { get => this._filter; set => this._filter = 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity _inputObject;
+
+ /// Identity Parameter
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Path)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.IResourceHealthIdentity 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.ResourceHealth.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ /// 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.ResourceHealth.Module.Instance.GetTelemetryId.Invoke();
+ if (telemetryId != "" && telemetryId != "internal")
+ {
+ __correlationId = telemetryId;
+ }
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzResourceHealthAvailabilityStatuses_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.ResourceHealth.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.ResourceHealth.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data.Message, new string[]{});
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 ;
+ }
+ }
+ await Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ if (InputObject?.Id != null)
+ {
+ await this.Client.AvailabilityStatusesGetByResourceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ }
+ else
+ {
+ // try to call with PATH parameters from Input Object
+ if (null == InputObject.ResourceUri)
+ {
+ ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceUri"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) );
+ }
+ await this.Client.AvailabilityStatusesGetByResource(InputObject.ResourceUri ?? null, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ }
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.UndeclaredResponseException urexception)
+ {
+ WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Cancel();
+ base.StopProcessing();
+ }
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.RestException(responseMessage, await response);
+ WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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 { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ /// 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.ResourceHealth.Models.Api20200501.IAvailabilityStatus
+ WriteObject((await response));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List.cs
new file mode 100644
index 000000000000..f07502e233b1
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List.cs
@@ -0,0 +1,434 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ ///
+ /// Lists the current availability status for all the resources in the subscription.
+ ///
+ ///
+ /// [OpenAPI] ListBySubscriptionId=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthAvailabilityStatuses_List")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Lists the current availability status for all the resources in the subscription.")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthAvailabilityStatuses_List : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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 flag to tell whether it is the first onOK call.
+ private bool _isFirst = true;
+
+ /// Link to retrieve next page.
+ private string _nextLink;
+
+ /// 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.ClientAPI;
+
+ ///
+ /// The credentials, account, tenant, and subscription used for communication with Azure
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
+ [global::System.Management.Automation.ValidateNotNull]
+ [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Azure)]
+ public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
+
+ /// Backing field for property.
+ private string _expand;
+
+ ///
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting $expand=recommendedactions in url query expands the recommendedactions in the response.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Setting $expand=recommendedactions in url query expands the recommendedactions in the response.",
+ SerializedName = @"$expand",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Expand { get => this._expand; set => this._expand = value; }
+
+ /// Backing field for property.
+ private string _filter;
+
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN",
+ SerializedName = @"$filter",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Filter { get => this._filter; set => this._filter = 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
+
+ /// Backing field for property.
+ private string[] _subscriptionId;
+
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI
+ /// for every service call.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.DefaultInfo(
+ Name = @"",
+ Description =@"",
+ Script = @"(Get-AzContext).Subscription.Id")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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.ResourceHealth.Module.Instance.GetTelemetryId.Invoke();
+ if (telemetryId != "" && telemetryId != "internal")
+ {
+ __correlationId = telemetryId;
+ }
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzResourceHealthAvailabilityStatuses_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.ResourceHealth.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.ResourceHealth.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data.Message, new string[]{});
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 ;
+ }
+ }
+ await Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ foreach( var SubscriptionId in this.SubscriptionId )
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesListBySubscriptionId(this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.UndeclaredResponseException urexception)
+ {
+ WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,SubscriptionId=SubscriptionId,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Cancel();
+ base.StopProcessing();
+ }
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.RestException(responseMessage, await response);
+ WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, SubscriptionId=SubscriptionId, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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 { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, SubscriptionId=SubscriptionId, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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
+ // response should be returning an array of some kind. +Pageable
+ // pageable / value / nextLink
+ var result = await response;
+ WriteObject(result.Value,true);
+ _nextLink = result.NextLink;
+ if (_isFirst)
+ {
+ _isFirst = false;
+ while (_nextLink != null)
+ {
+ if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage )
+ {
+ requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Method.Get );
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesListBySubscriptionId_Call(requestMessage, onOk, onDefault, this, Pipeline);
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List1.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List1.cs
new file mode 100644
index 000000000000..286d8f96748e
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List1.cs
@@ -0,0 +1,448 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ ///
+ /// Lists the current availability status for all the resources in the resource group.
+ ///
+ ///
+ /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthAvailabilityStatuses_List1")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Lists the current availability status for all the resources in the resource group.")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthAvailabilityStatuses_List1 : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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 flag to tell whether it is the first onOK call.
+ private bool _isFirst = true;
+
+ /// Link to retrieve next page.
+ private string _nextLink;
+
+ /// 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.ClientAPI;
+
+ ///
+ /// The credentials, account, tenant, and subscription used for communication with Azure
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
+ [global::System.Management.Automation.ValidateNotNull]
+ [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Azure)]
+ public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
+
+ /// Backing field for property.
+ private string _expand;
+
+ ///
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting $expand=recommendedactions in url query expands the recommendedactions in the response.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Setting $expand=recommendedactions in url query expands the recommendedactions in the response.",
+ SerializedName = @"$expand",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Expand { get => this._expand; set => this._expand = value; }
+
+ /// Backing field for property.
+ private string _filter;
+
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN",
+ SerializedName = @"$filter",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Filter { get => this._filter; set => this._filter = 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The name of the resource group.
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The name of the resource group.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Path)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string[] _subscriptionId;
+
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI
+ /// for every service call.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.DefaultInfo(
+ Name = @"",
+ Description =@"",
+ Script = @"(Get-AzContext).Subscription.Id")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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.ResourceHealth.Module.Instance.GetTelemetryId.Invoke();
+ if (telemetryId != "" && telemetryId != "internal")
+ {
+ __correlationId = telemetryId;
+ }
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzResourceHealthAvailabilityStatuses_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.ResourceHealth.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.ResourceHealth.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data.Message, new string[]{});
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 ;
+ }
+ }
+ await Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ foreach( var SubscriptionId in this.SubscriptionId )
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesListByResourceGroup(SubscriptionId, ResourceGroupName, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Cancel();
+ base.StopProcessing();
+ }
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.RestException(responseMessage, await response);
+ WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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
+ // response should be returning an array of some kind. +Pageable
+ // pageable / value / nextLink
+ var result = await response;
+ WriteObject(result.Value,true);
+ _nextLink = result.NextLink;
+ if (_isFirst)
+ {
+ _isFirst = false;
+ while (_nextLink != null)
+ {
+ if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage )
+ {
+ requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Method.Get );
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline);
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List2.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List2.cs
new file mode 100644
index 000000000000..2a1bd721c49f
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthAvailabilityStatuses_List2.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.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ ///
+ /// Lists all historical availability transitions and impacting events for a single resource.
+ ///
+ ///
+ /// [OpenAPI] List=>GET:"/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthAvailabilityStatuses_List2")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IAvailabilityStatus))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Lists all historical availability transitions and impacting events for a single resource.")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthAvailabilityStatuses_List2 : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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 flag to tell whether it is the first onOK call.
+ private bool _isFirst = true;
+
+ /// Link to retrieve next page.
+ private string _nextLink;
+
+ /// 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.MicrosoftResourceHealth Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.ClientAPI;
+
+ ///
+ /// The credentials, account, tenant, and subscription used for communication with Azure
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
+ [global::System.Management.Automation.ValidateNotNull]
+ [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Azure)]
+ public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
+
+ /// Backing field for property.
+ private string _expand;
+
+ ///
+ /// Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting $expand=recommendedactions in url query expands the recommendedactions in the response.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Setting $expand=recommendedactions in url query expands the recommendedactions in the response.",
+ SerializedName = @"$expand",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Expand { get => this._expand; set => this._expand = value; }
+
+ /// Backing field for property.
+ private string _filter;
+
+ ///
+ /// The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN",
+ SerializedName = @"$filter",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Query)]
+ public string Filter { get => this._filter; set => this._filter = 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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
+
+ /// Backing field for property.
+ private string _resourceUri;
+
+ ///
+ /// The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested
+ /// and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ /// and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}",
+ SerializedName = @"resourceUri",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.ParameterCategory.Path)]
+ public string ResourceUri { get => this._resourceUri; set => this._resourceUri = 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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.ResourceHealth.Module.Instance.GetTelemetryId.Invoke();
+ if (telemetryId != "" && telemetryId != "internal")
+ {
+ __correlationId = telemetryId;
+ }
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzResourceHealthAvailabilityStatuses_List2()
+ {
+
+ }
+
+ /// 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.ResourceHealth.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.ResourceHealth.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data.Message, new string[]{});
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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 ;
+ }
+ }
+ await Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.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.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesList(ResourceUri, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, onDefault, this, Pipeline);
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.UndeclaredResponseException urexception)
+ {
+ WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceUri=ResourceUri,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Cancel();
+ base.StopProcessing();
+ }
+
+ ///
+ /// 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.ResourceHealth.Models.Api20200501.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.ResourceHealth.Runtime.RestException(responseMessage, await response);
+ WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceUri=ResourceUri, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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 { ResourceUri=ResourceUri, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null })
+ {
+ 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.ResourceHealth.Models.Api20200501.IAvailabilityStatusListResult
+ /// 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
+ // response should be returning an array of some kind. +Pageable
+ // pageable / value / nextLink
+ var result = await response;
+ WriteObject(result.Value,true);
+ _nextLink = result.NextLink;
+ if (_isFirst)
+ {
+ _isFirst = false;
+ while (_nextLink != null)
+ {
+ if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage )
+ {
+ requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Method.Get );
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.AvailabilityStatusesList_Call(requestMessage, onOk, onDefault, this, Pipeline);
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthOperation_List.cs b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthOperation_List.cs
new file mode 100644
index 000000000000..399d8a8ab950
--- /dev/null
+++ b/swaggerci/resourcehealth/generated/cmdlets/GetAzResourceHealthOperation_List.cs
@@ -0,0 +1,356 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.Extensions;
+ using System;
+
+ /// Lists available operations for the resourcehealth resource provider
+ ///
+ /// [OpenAPI] List=>GET:"/providers/Microsoft.ResourceHealth/operations"
+ ///
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.InternalExport]
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceHealthOperation_List")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Models.Api20200501.IOperation))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Description(@"Lists available operations for the resourcehealth resource provider")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Generated]
+ public partial class GetAzResourceHealthOperation_List : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ResourceHealth.Runtime.IEventListener
+ {
+ /// 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