diff --git a/swaggerci/workloadmonitor/.gitattributes b/swaggerci/workloadmonitor/.gitattributes
new file mode 100644
index 000000000000..2125666142eb
--- /dev/null
+++ b/swaggerci/workloadmonitor/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/.gitignore b/swaggerci/workloadmonitor/.gitignore
new file mode 100644
index 000000000000..7998f37e1e47
--- /dev/null
+++ b/swaggerci/workloadmonitor/.gitignore
@@ -0,0 +1,5 @@
+bin
+obj
+.vs
+tools
+test/*-TestResults.xml
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.csproj b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.csproj
new file mode 100644
index 000000000000..9b08c8192a89
--- /dev/null
+++ b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.csproj
@@ -0,0 +1,44 @@
+
+
+
+ 0.1.0
+ 7.1
+ netstandard2.0
+ Library
+ Az.WorkloadMonitorApi.private
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi
+ true
+ false
+ ./bin
+ $(OutputPath)
+ Az.WorkloadMonitorApi.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/workloadmonitor/Az.WorkloadMonitorApi.format.ps1xml b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.format.ps1xml
new file mode 100644
index 000000000000..8bb2a8988ca3
--- /dev/null
+++ b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.format.ps1xml
@@ -0,0 +1,489 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.WorkloadMonitorApiIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.WorkloadMonitorApiIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ MonitorId
+
+
+ ProviderName
+
+
+ ResourceCollectionName
+
+
+ ResourceGroupName
+
+
+ ResourceName
+
+
+ SubscriptionId
+
+
+ TimestampUnix
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetails
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetails
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseError
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitor
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorList
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CurrentMonitorState
+
+
+ CurrentStateFirstObservedTimestamp
+
+
+ EvaluationTimestamp
+
+
+ LastReportedTimestamp
+
+
+ MonitorName
+
+
+ MonitorType
+
+
+ MonitoredObject
+
+
+ ParentMonitorName
+
+
+ PreviousMonitorState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChange
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChange
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeList
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CurrentMonitorState
+
+
+ CurrentStateFirstObservedTimestamp
+
+
+ EvaluationTimestamp
+
+
+ MonitorName
+
+
+ MonitorType
+
+
+ MonitoredObject
+
+
+ PreviousMonitorState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationList
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.nuspec b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.nuspec
new file mode 100644
index 000000000000..9e6c219d725f
--- /dev/null
+++ b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Az.WorkloadMonitorApi
+ 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/workloadmonitor/Az.WorkloadMonitorApi.psd1 b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.psd1
new file mode 100644
index 000000000000..31ad8a915bb5
--- /dev/null
+++ b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.psd1
@@ -0,0 +1,24 @@
+@{
+ GUID = '4ce2298c-da55-4ffa-8cad-049337e3c955'
+ RootModule = './Az.WorkloadMonitorApi.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: WorkloadMonitorApi cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.WorkloadMonitorApi.private.dll'
+ FormatsToProcess = './Az.WorkloadMonitorApi.format.ps1xml'
+ FunctionsToExport = 'Get-AzWorkloadMonitorApiHealthMonitor', 'Get-AzWorkloadMonitorApiHealthMonitorStateChange', '*'
+ AliasesToExport = '*'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'WorkloadMonitorApi'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
+}
diff --git a/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.psm1 b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.psm1
new file mode 100644
index 000000000000..24d02d6087f9
--- /dev/null
+++ b/swaggerci/workloadmonitor/Az.WorkloadMonitorApi.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.WorkloadMonitorApi.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/MSSharedLibKey.snk b/swaggerci/workloadmonitor/MSSharedLibKey.snk
new file mode 100644
index 000000000000..695f1b38774e
Binary files /dev/null and b/swaggerci/workloadmonitor/MSSharedLibKey.snk differ
diff --git a/swaggerci/workloadmonitor/README.md b/swaggerci/workloadmonitor/README.md
new file mode 100644
index 000000000000..c4e46de272fc
--- /dev/null
+++ b/swaggerci/workloadmonitor/README.md
@@ -0,0 +1,27 @@
+
+# Az.WorkloadMonitorApi
+This directory contains the PowerShell module for the WorkloadMonitorApi service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.WorkloadMonitorApi/)
+
+## 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.WorkloadMonitorApi`, see [how-to.md](how-to.md).
+
diff --git a/swaggerci/workloadmonitor/build-module.ps1 b/swaggerci/workloadmonitor/build-module.ps1
new file mode 100644
index 000000000000..d2bef5261b4b
--- /dev/null
+++ b/swaggerci/workloadmonitor/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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.WorkloadMonitorApi'
+$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: WorkloadMonitorApi 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.WorkloadMonitorApi.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/workloadmonitor/check-dependencies.ps1 b/swaggerci/workloadmonitor/check-dependencies.ps1
new file mode 100644
index 000000000000..ec3055201a71
--- /dev/null
+++ b/swaggerci/workloadmonitor/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/workloadmonitor/create-model-cmdlets.ps1 b/swaggerci/workloadmonitor/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..6cb14b669fb9
--- /dev/null
+++ b/swaggerci/workloadmonitor/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 = 'WorkloadMonitorApi'
+ $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/workloadmonitor/custom/Az.WorkloadMonitorApi.custom.psm1 b/swaggerci/workloadmonitor/custom/Az.WorkloadMonitorApi.custom.psm1
new file mode 100644
index 000000000000..d6df16009f24
--- /dev/null
+++ b/swaggerci/workloadmonitor/custom/Az.WorkloadMonitorApi.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.WorkloadMonitorApi.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.WorkloadMonitorApi.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/workloadmonitor/custom/README.md b/swaggerci/workloadmonitor/custom/README.md
new file mode 100644
index 000000000000..9981d27fe679
--- /dev/null
+++ b/swaggerci/workloadmonitor/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.WorkloadMonitorApi` 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.WorkloadMonitorApi.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.WorkloadMonitorApi` 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi`. 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.WorkloadMonitorApi.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.WorkloadMonitorApi.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.WorkloadMonitorApi`.
+- `Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.WorkloadMonitorApi`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/docs/Az.WorkloadMonitorApi.md b/swaggerci/workloadmonitor/docs/Az.WorkloadMonitorApi.md
new file mode 100644
index 000000000000..7d48fbff50b5
--- /dev/null
+++ b/swaggerci/workloadmonitor/docs/Az.WorkloadMonitorApi.md
@@ -0,0 +1,21 @@
+---
+Module Name: Az.WorkloadMonitorApi
+Module Guid: 4ce2298c-da55-4ffa-8cad-049337e3c955
+Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi
+Help Version: 1.0.0.0
+Locale: en-US
+---
+
+# Az.WorkloadMonitorApi Module
+## Description
+Microsoft Azure PowerShell: WorkloadMonitorApi cmdlets
+
+## Az.WorkloadMonitorApi Cmdlets
+### [Get-AzWorkloadMonitorApiHealthMonitor](Get-AzWorkloadMonitorApiHealthMonitor.md)
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
+### [Get-AzWorkloadMonitorApiHealthMonitorStateChange](Get-AzWorkloadMonitorApiHealthMonitorStateChange.md)
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
diff --git a/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitor.md b/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitor.md
new file mode 100644
index 000000000000..bae35286bedb
--- /dev/null
+++ b/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitor.md
@@ -0,0 +1,250 @@
+---
+external help file:
+Module Name: Az.WorkloadMonitorApi
+online version: https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitor
+schema: 2.0.0
+---
+
+# Get-AzWorkloadMonitorApiHealthMonitor
+
+## SYNOPSIS
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
+## SYNTAX
+
+### List (Default)
+```
+Get-AzWorkloadMonitorApiHealthMonitor -ProviderName -ResourceCollectionName
+ -ResourceGroupName -ResourceName [-SubscriptionId ] [-Expand ]
+ [-Filter ] [-DefaultProfile ] []
+```
+
+### Get
+```
+Get-AzWorkloadMonitorApiHealthMonitor -MonitorId -ProviderName
+ -ResourceCollectionName -ResourceGroupName -ResourceName
+ [-SubscriptionId ] [-Expand ] [-DefaultProfile ] []
+```
+
+### GetViaIdentity
+```
+Get-AzWorkloadMonitorApiHealthMonitor -InputObject [-Expand ]
+ [-DefaultProfile ] []
+```
+
+## DESCRIPTION
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
+## 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
+Optionally expand the monitor’s evidence and/or configuration.
+Example: $expand=evidence,configuration.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Filter
+Optionally filter by monitor name.
+Example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb.'
+
+```yaml
+Type: System.String
+Parameter Sets: List
+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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+Parameter Sets: GetViaIdentity
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByValue)
+Accept wildcard characters: False
+```
+
+### -MonitorId
+The monitor Id of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProviderName
+The provider name (ex: Microsoft.Compute for virtual machines).
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceCollectionName
+The resource collection name (ex: virtualMachines for virtual machines).
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The resource group of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceName
+The name of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The subscription Id of the virtual machine.
+
+```yaml
+Type: System.String[]
+Parameter Sets: Get, List
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor
+
+## 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
+ - `[MonitorId ]`: The monitor Id of the virtual machine.
+ - `[ProviderName ]`: The provider name (ex: Microsoft.Compute for virtual machines).
+ - `[ResourceCollectionName ]`: The resource collection name (ex: virtualMachines for virtual machines).
+ - `[ResourceGroupName ]`: The resource group of the virtual machine.
+ - `[ResourceName ]`: The name of the virtual machine.
+ - `[SubscriptionId ]`: The subscription Id of the virtual machine.
+ - `[TimestampUnix ]`: The timestamp of the state change (unix format).
+
+## RELATED LINKS
+
diff --git a/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitorStateChange.md b/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitorStateChange.md
new file mode 100644
index 000000000000..3c3daae56099
--- /dev/null
+++ b/swaggerci/workloadmonitor/docs/Get-AzWorkloadMonitorApiHealthMonitorStateChange.md
@@ -0,0 +1,296 @@
+---
+external help file:
+Module Name: Az.WorkloadMonitorApi
+online version: https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitorstatechange
+schema: 2.0.0
+---
+
+# Get-AzWorkloadMonitorApiHealthMonitorStateChange
+
+## SYNOPSIS
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
+## SYNTAX
+
+### List (Default)
+```
+Get-AzWorkloadMonitorApiHealthMonitorStateChange -MonitorId -ProviderName
+ -ResourceCollectionName -ResourceGroupName -ResourceName
+ [-SubscriptionId ] [-EndTimestampUtc ] [-Expand ] [-Filter ]
+ [-StartTimestampUtc ] [-DefaultProfile ] []
+```
+
+### Get
+```
+Get-AzWorkloadMonitorApiHealthMonitorStateChange -MonitorId -ProviderName
+ -ResourceCollectionName -ResourceGroupName -ResourceName -TimestampUnix
+ [-SubscriptionId ] [-Expand ] [-DefaultProfile ] []
+```
+
+### GetViaIdentity
+```
+Get-AzWorkloadMonitorApiHealthMonitorStateChange -InputObject [-Expand ]
+ [-DefaultProfile ] []
+```
+
+## DESCRIPTION
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+
+## 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
+```
+
+### -EndTimestampUtc
+The end of the time window.
+
+```yaml
+Type: System.DateTime
+Parameter Sets: List
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Expand
+Optionally expand the monitor’s evidence and/or configuration.
+Example: $expand=evidence,configuration.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Filter
+Optionally filter by heartbeat condition.
+Example: $filter=isHeartbeat eq false.
+
+```yaml
+Type: System.String
+Parameter Sets: List
+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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+Parameter Sets: GetViaIdentity
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByValue)
+Accept wildcard characters: False
+```
+
+### -MonitorId
+The monitor Id of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProviderName
+The provider name (ex: Microsoft.Compute for virtual machines).
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceCollectionName
+The resource collection name (ex: virtualMachines for virtual machines).
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The resource group of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceName
+The name of the virtual machine.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -StartTimestampUtc
+The start of the time window.
+
+```yaml
+Type: System.DateTime
+Parameter Sets: List
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The subscription Id of the virtual machine.
+
+```yaml
+Type: System.String[]
+Parameter Sets: Get, List
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -TimestampUnix
+The timestamp of the state change (unix format).
+
+```yaml
+Type: System.String
+Parameter Sets: Get
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange
+
+## 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
+ - `[MonitorId ]`: The monitor Id of the virtual machine.
+ - `[ProviderName ]`: The provider name (ex: Microsoft.Compute for virtual machines).
+ - `[ResourceCollectionName ]`: The resource collection name (ex: virtualMachines for virtual machines).
+ - `[ResourceGroupName ]`: The resource group of the virtual machine.
+ - `[ResourceName ]`: The name of the virtual machine.
+ - `[SubscriptionId ]`: The subscription Id of the virtual machine.
+ - `[TimestampUnix ]`: The timestamp of the state change (unix format).
+
+## RELATED LINKS
+
diff --git a/swaggerci/workloadmonitor/docs/README.md b/swaggerci/workloadmonitor/docs/README.md
new file mode 100644
index 000000000000..1b8fcf2cc8b5
--- /dev/null
+++ b/swaggerci/workloadmonitor/docs/README.md
@@ -0,0 +1,11 @@
+# Docs
+This directory contains the documentation of the cmdlets for the `Az.WorkloadMonitorApi` 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.WorkloadMonitorApi` 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/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitor.md b/swaggerci/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitor.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitor.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/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitorStateChange.md b/swaggerci/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitorStateChange.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/workloadmonitor/examples/Get-AzWorkloadMonitorApiHealthMonitorStateChange.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/workloadmonitor/export-surface.ps1 b/swaggerci/workloadmonitor/export-surface.ps1
new file mode 100644
index 000000000000..661a9298552b
--- /dev/null
+++ b/swaggerci/workloadmonitor/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.WorkloadMonitorApi.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.WorkloadMonitorApi'
+$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/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitor.ps1 b/swaggerci/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitor.ps1
new file mode 100644
index 000000000000..162925aa9f56
--- /dev/null
+++ b/swaggerci/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitor.ps1
@@ -0,0 +1,234 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Description
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor
+.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
+ [MonitorId ]: The monitor Id of the virtual machine.
+ [ProviderName ]: The provider name (ex: Microsoft.Compute for virtual machines).
+ [ResourceCollectionName ]: The resource collection name (ex: virtualMachines for virtual machines).
+ [ResourceGroupName ]: The resource group of the virtual machine.
+ [ResourceName ]: The name of the virtual machine.
+ [SubscriptionId ]: The subscription Id of the virtual machine.
+ [TimestampUnix ]: The timestamp of the state change (unix format).
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitor
+#>
+function Get-AzWorkloadMonitorApiHealthMonitor {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The monitor Id of the virtual machine.
+ ${MonitorId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The provider name (ex: Microsoft.Compute for virtual machines).
+ ${ProviderName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource collection name (ex: virtualMachines for virtual machines).
+ ${ResourceCollectionName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource group of the virtual machine.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The name of the virtual machine.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The subscription Id of the virtual machine.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally expand the monitor’s evidence and/or configuration.
+ # Example: $expand=evidence,configuration.
+ ${Expand},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally filter by monitor name.
+ # Example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb.'
+ ${Filter},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_Get';
+ GetViaIdentity = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_GetViaIdentity';
+ List = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitorStateChange.ps1 b/swaggerci/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitorStateChange.ps1
new file mode 100644
index 000000000000..d258b9872733
--- /dev/null
+++ b/swaggerci/workloadmonitor/exports/Get-AzWorkloadMonitorApiHealthMonitorStateChange.ps1
@@ -0,0 +1,253 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Description
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange
+.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
+ [MonitorId ]: The monitor Id of the virtual machine.
+ [ProviderName ]: The provider name (ex: Microsoft.Compute for virtual machines).
+ [ResourceCollectionName ]: The resource collection name (ex: virtualMachines for virtual machines).
+ [ResourceGroupName ]: The resource group of the virtual machine.
+ [ResourceName ]: The name of the virtual machine.
+ [SubscriptionId ]: The subscription Id of the virtual machine.
+ [TimestampUnix ]: The timestamp of the state change (unix format).
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitorstatechange
+#>
+function Get-AzWorkloadMonitorApiHealthMonitorStateChange {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The monitor Id of the virtual machine.
+ ${MonitorId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The provider name (ex: Microsoft.Compute for virtual machines).
+ ${ProviderName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource collection name (ex: virtualMachines for virtual machines).
+ ${ResourceCollectionName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource group of the virtual machine.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The name of the virtual machine.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The subscription Id of the virtual machine.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The timestamp of the state change (unix format).
+ ${TimestampUnix},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally expand the monitor’s evidence and/or configuration.
+ # Example: $expand=evidence,configuration.
+ ${Expand},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.DateTime]
+ # The end of the time window.
+ ${EndTimestampUtc},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally filter by heartbeat condition.
+ # Example: $filter=isHeartbeat eq false.
+ ${Filter},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.DateTime]
+ # The start of the time window.
+ ${StartTimestampUtc},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_Get';
+ GetViaIdentity = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_GetViaIdentity';
+ List = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/exports/ProxyCmdletDefinitions.ps1 b/swaggerci/workloadmonitor/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..665147399e7d
--- /dev/null
+++ b/swaggerci/workloadmonitor/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,480 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Description
+Get the health state change of a monitor of a virtual machine at the provided timestamp.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange
+.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
+ [MonitorId ]: The monitor Id of the virtual machine.
+ [ProviderName ]: The provider name (ex: Microsoft.Compute for virtual machines).
+ [ResourceCollectionName ]: The resource collection name (ex: virtualMachines for virtual machines).
+ [ResourceGroupName ]: The resource group of the virtual machine.
+ [ResourceName ]: The name of the virtual machine.
+ [SubscriptionId ]: The subscription Id of the virtual machine.
+ [TimestampUnix ]: The timestamp of the state change (unix format).
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitorstatechange
+#>
+function Get-AzWorkloadMonitorApiHealthMonitorStateChange {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The monitor Id of the virtual machine.
+ ${MonitorId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The provider name (ex: Microsoft.Compute for virtual machines).
+ ${ProviderName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource collection name (ex: virtualMachines for virtual machines).
+ ${ResourceCollectionName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource group of the virtual machine.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The name of the virtual machine.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The subscription Id of the virtual machine.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The timestamp of the state change (unix format).
+ ${TimestampUnix},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally expand the monitor’s evidence and/or configuration.
+ # Example: $expand=evidence,configuration.
+ ${Expand},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.DateTime]
+ # The end of the time window.
+ ${EndTimestampUtc},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally filter by heartbeat condition.
+ # Example: $filter=isHeartbeat eq false.
+ ${Filter},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.DateTime]
+ # The start of the time window.
+ ${StartTimestampUtc},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_Get';
+ GetViaIdentity = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_GetViaIdentity';
+ List = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitorStateChange_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Description
+Get the current health status of a monitor of a virtual machine.
+Optional parameter: $expand (retrieve the monitor's evidence and configuration).
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor
+.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
+ [MonitorId ]: The monitor Id of the virtual machine.
+ [ProviderName ]: The provider name (ex: Microsoft.Compute for virtual machines).
+ [ResourceCollectionName ]: The resource collection name (ex: virtualMachines for virtual machines).
+ [ResourceGroupName ]: The resource group of the virtual machine.
+ [ResourceName ]: The name of the virtual machine.
+ [SubscriptionId ]: The subscription Id of the virtual machine.
+ [TimestampUnix ]: The timestamp of the state change (unix format).
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.workloadmonitorapi/get-azworkloadmonitorapihealthmonitor
+#>
+function Get-AzWorkloadMonitorApiHealthMonitor {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The monitor Id of the virtual machine.
+ ${MonitorId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The provider name (ex: Microsoft.Compute for virtual machines).
+ ${ProviderName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource collection name (ex: virtualMachines for virtual machines).
+ ${ResourceCollectionName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The resource group of the virtual machine.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [System.String]
+ # The name of the virtual machine.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The subscription Id of the virtual machine.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally expand the monitor’s evidence and/or configuration.
+ # Example: $expand=evidence,configuration.
+ ${Expand},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Query')]
+ [System.String]
+ # Optionally filter by monitor name.
+ # Example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb.'
+ ${Filter},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_Get';
+ GetViaIdentity = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_GetViaIdentity';
+ List = 'Az.WorkloadMonitorApi.private\Get-AzWorkloadMonitorApiHealthMonitor_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/exports/README.md b/swaggerci/workloadmonitor/exports/README.md
new file mode 100644
index 000000000000..8eb8c34ac3b0
--- /dev/null
+++ b/swaggerci/workloadmonitor/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.WorkloadMonitorApi`. No other cmdlets in this repository are directly exported. What that means is the `Az.WorkloadMonitorApi` 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.WorkloadMonitorApi.private.dll`) and from the `../custom/Az.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/generate-help.ps1 b/swaggerci/workloadmonitor/generate-help.ps1
new file mode 100644
index 000000000000..268592942675
--- /dev/null
+++ b/swaggerci/workloadmonitor/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.WorkloadMonitorApi.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.WorkloadMonitorApi.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/Module.cs b/swaggerci/workloadmonitor/generated/Module.cs
new file mode 100644
index 000000000000..43e6aa092824
--- /dev/null
+++ b/swaggerci/workloadmonitor/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.WorkloadMonitorApi
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.WorkloadMonitorApi 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.WorkloadMonitorApi.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.WorkloadMonitorApi";
+
+ /// 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.WorkloadMonitorApi";
+
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.WorkloadMonitorApi();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Any.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Any.PowerShell.cs
new file mode 100644
index 000000000000..89af72921b4b
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Any.PowerShell.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial class Any
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Any(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Any(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Any(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Any(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial interface IAny
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Any.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Any.TypeConverter.cs
new file mode 100644
index 000000000000..70e33ef504ce
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Any.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.IAny ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Any.cs b/swaggerci/workloadmonitor/generated/api/Models/Any.cs
new file mode 100644
index 000000000000..fc6a500dc643
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Any.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAnyInternal
+ {
+
+ /// Creates an new instance.
+ public Any()
+ {
+
+ }
+ }
+ /// Any object
+ public partial interface IAny :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+
+ }
+ /// Any object
+ internal partial interface IAnyInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Any.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Any.json.cs
new file mode 100644
index 000000000000..83a5b6079bcc
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Any.json.cs
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal Any(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new Any(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.PowerShell.cs
new file mode 100644
index 000000000000..4357a05328a1
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Error details
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))]
+ public partial class ErrorDetails
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorDetails(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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorDetails(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorDetails(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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Message, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorDetails(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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal)this).Message, 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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Error details
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))]
+ public partial interface IErrorDetails
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.TypeConverter.cs
new file mode 100644
index 000000000000..ef7b0ccfb03a
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorDetailsTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorDetails.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorDetails.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/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.cs
new file mode 100644
index 000000000000..24ae1e22ca18
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error details
+ public partial class ErrorDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetailsInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ /// Error code identifying the specific error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Code { get => this._code; set => this._code = value; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// A human-readable error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Message { get => this._message; set => this._message = value; }
+
+ /// Creates an new instance.
+ public ErrorDetails()
+ {
+
+ }
+ }
+ /// Error details
+ public partial interface IErrorDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Error code identifying the specific error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Error code identifying the specific error.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// A human-readable error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A human-readable error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+
+ }
+ /// Error details
+ internal partial interface IErrorDetailsInternal
+
+ {
+ /// Error code identifying the specific error.
+ string Code { get; set; }
+ /// A human-readable error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.json.cs
new file mode 100644
index 000000000000..23a71d779b6f
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorDetails.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error details
+ public partial class ErrorDetails
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new ErrorDetails(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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..36cc027d9df3
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.PowerShell.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Error response
+ [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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetailsTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetailsTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Error response
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial interface IErrorResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..f3ebd3ba4dc3
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.cs
new file mode 100644
index 000000000000..59db4e39960f
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error response
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal
+ {
+
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Code = value ?? null; }
+
+ /// Error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Detail = value ?? null /* arrayOf */; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError _error;
+
+ /// Error info.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseError()); set => this._error = value; }
+
+ /// Human-readable representation of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)Error).Message = value ?? null; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseError()); set { {_error = value;} } }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// Error response
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// Error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get; set; }
+ /// Human-readable representation of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable representation of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+
+ }
+ /// Error response
+ internal partial interface IErrorResponseInternal
+
+ {
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ string Code { get; set; }
+ /// Error details.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get; set; }
+ /// Error info.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError Error { get; set; }
+ /// Human-readable representation of the error.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponse.json.cs
new file mode 100644
index 000000000000..81ff755c5d12
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error response
+ 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponseError.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.PowerShell.cs
new file mode 100644
index 000000000000..d2a3b63ecbbb
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Error info.
+ [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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetailsTypeConverter.ConvertFrom));
+ }
+ 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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetailsTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Error info.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseErrorTypeConverter))]
+ public partial interface IErrorResponseError
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.TypeConverter.cs
new file mode 100644
index 000000000000..4fb9272c6591
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.cs
new file mode 100644
index 000000000000..b3dc4ed557de
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.cs
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error info.
+ public partial class ErrorResponseError :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseErrorInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Code { get => this._code; set => this._code = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] _detail;
+
+ /// Error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get => this._detail; set => this._detail = value; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// Human-readable representation of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Message { get => this._message; set => this._message = value; }
+
+ /// Creates an new instance.
+ public ErrorResponseError()
+ {
+
+ }
+ }
+ /// Error info.
+ public partial interface IErrorResponseError :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// Error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get; set; }
+ /// Human-readable representation of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable representation of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+
+ }
+ /// Error info.
+ internal partial interface IErrorResponseErrorInternal
+
+ {
+ ///
+ /// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ ///
+ string Code { get; set; }
+ /// Error details.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails[] Detail { get; set; }
+ /// Human-readable representation of the error.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.json.cs
new file mode 100644
index 000000000000..605ee3c85cd8
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/ErrorResponseError.json.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Error info.
+ 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponseError(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorDetails.FromJson(__u) )) ))() : null : Detail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IErrorResponseError FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.XNodeArray();
+ foreach( var __x in this._detail )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("details",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.PowerShell.cs
new file mode 100644
index 000000000000..a1274979f919
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.PowerShell.cs
@@ -0,0 +1,258 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Information about the monitor’s current health status.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorTypeConverter))]
+ public partial class HealthMonitor
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitor(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitor(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitor(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("ParentMonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).ParentMonitorName = (string) content.GetValueForProperty("ParentMonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).ParentMonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastReportedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).LastReportedTimestamp = (string) content.GetValueForProperty("LastReportedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).LastReportedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal HealthMonitor(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("ParentMonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).ParentMonitorName = (string) content.GetValueForProperty("ParentMonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).ParentMonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastReportedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).LastReportedTimestamp = (string) content.GetValueForProperty("LastReportedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).LastReportedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Information about the monitor’s current health status.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorTypeConverter))]
+ public partial interface IHealthMonitor
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.TypeConverter.cs
new file mode 100644
index 000000000000..cbc064e3976f
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitor.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitor.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitor.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.cs
new file mode 100644
index 000000000000..3b44bf388efc
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.cs
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the monitor’s current health status.
+ public partial class HealthMonitor :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource();
+
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).CurrentMonitorState; }
+
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string CurrentStateFirstObservedTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).CurrentStateFirstObservedTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).CurrentStateFirstObservedTimestamp = value ?? null; }
+
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string EvaluationTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).EvaluationTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).EvaluationTimestamp = value ?? null; }
+
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).Evidence; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).Evidence = value ?? null /* model class */; }
+
+ /// The resource Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id; }
+
+ /// Timestamp of the monitor's last reported health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string LastReportedTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).LastReportedTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).LastReportedTimestamp = value ?? null; }
+
+ /// Internal Acessors for CurrentMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal.CurrentMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).CurrentMonitorState; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).CurrentMonitorState = value; }
+
+ /// Internal Acessors for PreviousMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal.PreviousMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).PreviousMonitorState; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).PreviousMonitorState = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type = value; }
+
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorConfiguration = value ?? null /* model class */; }
+
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitorName { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorName; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorName = value ?? null; }
+
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitorType = value ?? null; }
+
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitoredObject { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitoredObject; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).MonitoredObject = value ?? null; }
+
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name; }
+
+ /// Name of the parent monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string ParentMonitorName { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).ParentMonitorName; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).ParentMonitorName = value ?? null; }
+
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)Property).PreviousMonitorState; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties _property;
+
+ /// Properties of the monitor's health status.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorProperties()); set => this._property = value; }
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public HealthMonitor()
+ {
+
+ }
+
+ /// 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.WorkloadMonitorApi.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Information about the monitor’s current health status.
+ public partial interface IHealthMonitor :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource
+ {
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Current health state of the monitor.",
+ SerializedName = @"currentMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; }
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health state change.",
+ SerializedName = @"currentStateFirstObservedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health evaluation.",
+ SerializedName = @"evaluationTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Evidence validating the monitor's current health state.",
+ SerializedName = @"evidence",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// Timestamp of the monitor's last reported health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last reported health state.",
+ SerializedName = @"lastReportedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string LastReportedTimestamp { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The configuration settings at the time of the monitor's health evaluation.",
+ SerializedName = @"monitorConfiguration",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable name of the monitor.",
+ SerializedName = @"monitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of the monitor.",
+ SerializedName = @"monitorType",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Dynamic monitored object of the monitor.",
+ SerializedName = @"monitoredObject",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitoredObject { get; set; }
+ /// Name of the parent monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Name of the parent monitor.",
+ SerializedName = @"parentMonitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ParentMonitorName { get; set; }
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Previous health state of the monitor.",
+ SerializedName = @"previousMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; }
+
+ }
+ /// Information about the monitor’s current health status.
+ internal partial interface IHealthMonitorInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal
+ {
+ /// Current health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; set; }
+ /// Timestamp of the monitor's last health state change.
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// Timestamp of the monitor's last reported health state.
+ string LastReportedTimestamp { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ string MonitoredObject { get; set; }
+ /// Name of the parent monitor.
+ string ParentMonitorName { get; set; }
+ /// Previous health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; set; }
+ /// Properties of the monitor's health status.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties Property { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.json.cs
new file mode 100644
index 000000000000..8fbf805f6b52
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitor.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the monitor’s current health status.
+ public partial class HealthMonitor
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitor(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitor(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorProperties.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.PowerShell.cs
new file mode 100644
index 000000000000..2f2e3cebcc77
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Information about the current health statuses of the monitors.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorListTypeConverter))]
+ public partial class HealthMonitorList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitorList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitorList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitorList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)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 HealthMonitorList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Information about the current health statuses of the monitors.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorListTypeConverter))]
+ public partial interface IHealthMonitorList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.TypeConverter.cs
new file mode 100644
index 000000000000..19e594eec30d
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorListTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitorList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitorList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitorList.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.cs
new file mode 100644
index 000000000000..4ad4f5806c65
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the current health statuses of the monitors.
+ public partial class HealthMonitorList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[] _value;
+
+ /// Array of health monitors of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public HealthMonitorList()
+ {
+
+ }
+ }
+ /// Information about the current health statuses of the monitors.
+ public partial interface IHealthMonitorList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Link to next page if the list is too long.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// Array of health monitors of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Array of health monitors of the virtual machine.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[] Value { get; set; }
+
+ }
+ /// Information about the current health statuses of the monitors.
+ internal partial interface IHealthMonitorListInternal
+
+ {
+ /// Link to next page if the list is too long.
+ string NextLink { get; set; }
+ /// Array of health monitors of the virtual machine.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.json.cs
new file mode 100644
index 000000000000..cdb6d5886a0b
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the current health statuses of the monitors.
+ public partial class HealthMonitorList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorList FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitorList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitorList(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitor) (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitor.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.PowerShell.cs
new file mode 100644
index 000000000000..f7ce88719faf
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.PowerShell.cs
@@ -0,0 +1,226 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Properties of the monitor.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorPropertiesTypeConverter))]
+ public partial class HealthMonitorProperties
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitorProperties(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitorProperties(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitorProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("ParentMonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).ParentMonitorName = (string) content.GetValueForProperty("ParentMonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).ParentMonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastReportedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).LastReportedTimestamp = (string) content.GetValueForProperty("LastReportedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).LastReportedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal HealthMonitorProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("ParentMonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).ParentMonitorName = (string) content.GetValueForProperty("ParentMonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).ParentMonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastReportedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).LastReportedTimestamp = (string) content.GetValueForProperty("LastReportedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).LastReportedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of the monitor.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorPropertiesTypeConverter))]
+ public partial interface IHealthMonitorProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.TypeConverter.cs
new file mode 100644
index 000000000000..a1e7a43088de
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorPropertiesTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitorProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitorProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitorProperties.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.cs
new file mode 100644
index 000000000000..efd6228b37b7
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.cs
@@ -0,0 +1,227 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Properties of the monitor.
+ public partial class HealthMonitorProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? _currentMonitorState;
+
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get => this._currentMonitorState; }
+
+ /// Backing field for property.
+ private string _currentStateFirstObservedTimestamp;
+
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string CurrentStateFirstObservedTimestamp { get => this._currentStateFirstObservedTimestamp; set => this._currentStateFirstObservedTimestamp = value; }
+
+ /// Backing field for property.
+ private string _evaluationTimestamp;
+
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string EvaluationTimestamp { get => this._evaluationTimestamp; set => this._evaluationTimestamp = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny _evidence;
+
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get => (this._evidence = this._evidence ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any()); set => this._evidence = value; }
+
+ /// Backing field for property.
+ private string _lastReportedTimestamp;
+
+ /// Timestamp of the monitor's last reported health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string LastReportedTimestamp { get => this._lastReportedTimestamp; set => this._lastReportedTimestamp = value; }
+
+ /// Internal Acessors for CurrentMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal.CurrentMonitorState { get => this._currentMonitorState; set { {_currentMonitorState = value;} } }
+
+ /// Internal Acessors for PreviousMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorPropertiesInternal.PreviousMonitorState { get => this._previousMonitorState; set { {_previousMonitorState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny _monitorConfiguration;
+
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get => (this._monitorConfiguration = this._monitorConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any()); set => this._monitorConfiguration = value; }
+
+ /// Backing field for property.
+ private string _monitorName;
+
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitorName { get => this._monitorName; set => this._monitorName = value; }
+
+ /// Backing field for property.
+ private string _monitorType;
+
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitorType { get => this._monitorType; set => this._monitorType = value; }
+
+ /// Backing field for property.
+ private string _monitoredObject;
+
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitoredObject { get => this._monitoredObject; set => this._monitoredObject = value; }
+
+ /// Backing field for property.
+ private string _parentMonitorName;
+
+ /// Name of the parent monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string ParentMonitorName { get => this._parentMonitorName; set => this._parentMonitorName = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? _previousMonitorState;
+
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get => this._previousMonitorState; }
+
+ /// Creates an new instance.
+ public HealthMonitorProperties()
+ {
+
+ }
+ }
+ /// Properties of the monitor.
+ public partial interface IHealthMonitorProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Current health state of the monitor.",
+ SerializedName = @"currentMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; }
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health state change.",
+ SerializedName = @"currentStateFirstObservedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health evaluation.",
+ SerializedName = @"evaluationTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Evidence validating the monitor's current health state.",
+ SerializedName = @"evidence",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// Timestamp of the monitor's last reported health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last reported health state.",
+ SerializedName = @"lastReportedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string LastReportedTimestamp { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The configuration settings at the time of the monitor's health evaluation.",
+ SerializedName = @"monitorConfiguration",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable name of the monitor.",
+ SerializedName = @"monitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of the monitor.",
+ SerializedName = @"monitorType",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Dynamic monitored object of the monitor.",
+ SerializedName = @"monitoredObject",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitoredObject { get; set; }
+ /// Name of the parent monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Name of the parent monitor.",
+ SerializedName = @"parentMonitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ParentMonitorName { get; set; }
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Previous health state of the monitor.",
+ SerializedName = @"previousMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; }
+
+ }
+ /// Properties of the monitor.
+ internal partial interface IHealthMonitorPropertiesInternal
+
+ {
+ /// Current health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; set; }
+ /// Timestamp of the monitor's last health state change.
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// Timestamp of the monitor's last reported health state.
+ string LastReportedTimestamp { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ string MonitoredObject { get; set; }
+ /// Name of the parent monitor.
+ string ParentMonitorName { get; set; }
+ /// Previous health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.json.cs
new file mode 100644
index 000000000000..c05e6d1a458f
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorProperties.json.cs
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Properties of the monitor.
+ public partial class HealthMonitorProperties
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitorProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitorProperties(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_monitorName = If( json?.PropertyT("monitorName"), out var __jsonMonitorName) ? (string)__jsonMonitorName : (string)MonitorName;}
+ {_monitorType = If( json?.PropertyT("monitorType"), out var __jsonMonitorType) ? (string)__jsonMonitorType : (string)MonitorType;}
+ {_monitoredObject = If( json?.PropertyT("monitoredObject"), out var __jsonMonitoredObject) ? (string)__jsonMonitoredObject : (string)MonitoredObject;}
+ {_parentMonitorName = If( json?.PropertyT("parentMonitorName"), out var __jsonParentMonitorName) ? (string)__jsonParentMonitorName : (string)ParentMonitorName;}
+ {_previousMonitorState = If( json?.PropertyT("previousMonitorState"), out var __jsonPreviousMonitorState) ? (string)__jsonPreviousMonitorState : (string)PreviousMonitorState;}
+ {_currentMonitorState = If( json?.PropertyT("currentMonitorState"), out var __jsonCurrentMonitorState) ? (string)__jsonCurrentMonitorState : (string)CurrentMonitorState;}
+ {_evaluationTimestamp = If( json?.PropertyT("evaluationTimestamp"), out var __jsonEvaluationTimestamp) ? (string)__jsonEvaluationTimestamp : (string)EvaluationTimestamp;}
+ {_currentStateFirstObservedTimestamp = If( json?.PropertyT("currentStateFirstObservedTimestamp"), out var __jsonCurrentStateFirstObservedTimestamp) ? (string)__jsonCurrentStateFirstObservedTimestamp : (string)CurrentStateFirstObservedTimestamp;}
+ {_lastReportedTimestamp = If( json?.PropertyT("lastReportedTimestamp"), out var __jsonLastReportedTimestamp) ? (string)__jsonLastReportedTimestamp : (string)LastReportedTimestamp;}
+ {_evidence = If( json?.PropertyT("evidence"), out var __jsonEvidence) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any.FromJson(__jsonEvidence) : Evidence;}
+ {_monitorConfiguration = If( json?.PropertyT("monitorConfiguration"), out var __jsonMonitorConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any.FromJson(__jsonMonitorConfiguration) : MonitorConfiguration;}
+ 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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._monitorName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitorName.ToString()) : null, "monitorName" ,container.Add );
+ AddIf( null != (((object)this._monitorType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitorType.ToString()) : null, "monitorType" ,container.Add );
+ AddIf( null != (((object)this._monitoredObject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitoredObject.ToString()) : null, "monitoredObject" ,container.Add );
+ AddIf( null != (((object)this._parentMonitorName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._parentMonitorName.ToString()) : null, "parentMonitorName" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._previousMonitorState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._previousMonitorState.ToString()) : null, "previousMonitorState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._currentMonitorState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._currentMonitorState.ToString()) : null, "currentMonitorState" ,container.Add );
+ }
+ AddIf( null != (((object)this._evaluationTimestamp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._evaluationTimestamp.ToString()) : null, "evaluationTimestamp" ,container.Add );
+ AddIf( null != (((object)this._currentStateFirstObservedTimestamp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._currentStateFirstObservedTimestamp.ToString()) : null, "currentStateFirstObservedTimestamp" ,container.Add );
+ AddIf( null != (((object)this._lastReportedTimestamp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._lastReportedTimestamp.ToString()) : null, "lastReportedTimestamp" ,container.Add );
+ AddIf( null != this._evidence ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) this._evidence.ToJson(null,serializationMode) : null, "evidence" ,container.Add );
+ AddIf( null != this._monitorConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) this._monitorConfiguration.ToJson(null,serializationMode) : null, "monitorConfiguration" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.PowerShell.cs
new file mode 100644
index 000000000000..99a95b9e3636
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.PowerShell.cs
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Information about the monitor’s health state change at the provided timestamp.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangeTypeConverter))]
+ public partial class HealthMonitorStateChange
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitorStateChange(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitorStateChange(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitorStateChange(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal HealthMonitorStateChange(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Information about the monitor’s health state change at the provided timestamp.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangeTypeConverter))]
+ public partial interface IHealthMonitorStateChange
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.TypeConverter.cs
new file mode 100644
index 000000000000..e5d3dbb6e038
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorStateChangeTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitorStateChange.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChange.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChange.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.cs
new file mode 100644
index 000000000000..d9570a4379c6
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.cs
@@ -0,0 +1,218 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the monitor’s health state change at the provided timestamp.
+ public partial class HealthMonitorStateChange :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource();
+
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).CurrentMonitorState; }
+
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string CurrentStateFirstObservedTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).CurrentStateFirstObservedTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).CurrentStateFirstObservedTimestamp = value ?? null; }
+
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string EvaluationTimestamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).EvaluationTimestamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).EvaluationTimestamp = value ?? null; }
+
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).Evidence; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).Evidence = value ?? null /* model class */; }
+
+ /// The resource Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id; }
+
+ /// Internal Acessors for CurrentMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal.CurrentMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).CurrentMonitorState; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).CurrentMonitorState = value; }
+
+ /// Internal Acessors for PreviousMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal.PreviousMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).PreviousMonitorState; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).PreviousMonitorState = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type = value; }
+
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorConfiguration = value ?? null /* model class */; }
+
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitorName { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorName; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorName = value ?? null; }
+
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitorType = value ?? null; }
+
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string MonitoredObject { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitoredObject; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).MonitoredObject = value ?? null; }
+
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Name; }
+
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)Property).PreviousMonitorState; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties _property;
+
+ /// Properties of the monitor's state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeProperties()); set => this._property = value; }
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public HealthMonitorStateChange()
+ {
+
+ }
+
+ /// 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.WorkloadMonitorApi.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Information about the monitor’s health state change at the provided timestamp.
+ public partial interface IHealthMonitorStateChange :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource
+ {
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Current health state of the monitor.",
+ SerializedName = @"currentMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; }
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health state change.",
+ SerializedName = @"currentStateFirstObservedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health evaluation.",
+ SerializedName = @"evaluationTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Evidence validating the monitor's current health state.",
+ SerializedName = @"evidence",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The configuration settings at the time of the monitor's health evaluation.",
+ SerializedName = @"monitorConfiguration",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable name of the monitor.",
+ SerializedName = @"monitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of the monitor.",
+ SerializedName = @"monitorType",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Dynamic monitored object of the monitor.",
+ SerializedName = @"monitoredObject",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitoredObject { get; set; }
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Previous health state of the monitor.",
+ SerializedName = @"previousMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; }
+
+ }
+ /// Information about the monitor’s health state change at the provided timestamp.
+ internal partial interface IHealthMonitorStateChangeInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal
+ {
+ /// Current health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; set; }
+ /// Timestamp of the monitor's last health state change.
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ string MonitoredObject { get; set; }
+ /// Previous health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; set; }
+ /// Properties of the monitor's state change.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties Property { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.json.cs
new file mode 100644
index 000000000000..c5c7bbbec62d
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChange.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Information about the monitor’s health state change at the provided timestamp.
+ public partial class HealthMonitorStateChange
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitorStateChange(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitorStateChange(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeProperties.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.PowerShell.cs
new file mode 100644
index 000000000000..8fe57e8d6397
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.PowerShell.cs
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// Information about the health state changes of the monitor within the provided time window.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangeListTypeConverter))]
+ public partial class HealthMonitorStateChangeList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitorStateChangeList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitorStateChangeList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitorStateChangeList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)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 HealthMonitorStateChangeList(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Information about the health state changes of the monitor within the provided time window.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangeListTypeConverter))]
+ public partial interface IHealthMonitorStateChangeList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.TypeConverter.cs
new file mode 100644
index 000000000000..8a44abb8cd95
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorStateChangeListTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitorStateChangeList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChangeList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChangeList.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.cs
new file mode 100644
index 000000000000..38b44e35c2bf
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ ///
+ /// Information about the health state changes of the monitor within the provided time window.
+ ///
+ public partial class HealthMonitorStateChangeList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[] _value;
+
+ /// Array of health state changes within the specified time window.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public HealthMonitorStateChangeList()
+ {
+
+ }
+ }
+ /// Information about the health state changes of the monitor within the provided time window.
+ public partial interface IHealthMonitorStateChangeList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Link to next page if the list is too long.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// Array of health state changes within the specified time window.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Array of health state changes within the specified time window.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[] Value { get; set; }
+
+ }
+ /// Information about the health state changes of the monitor within the provided time window.
+ internal partial interface IHealthMonitorStateChangeListInternal
+
+ {
+ /// Link to next page if the list is too long.
+ string NextLink { get; set; }
+ /// Array of health state changes within the specified time window.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.json.cs
new file mode 100644
index 000000000000..f8be9a645989
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeList.json.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ ///
+ /// Information about the health state changes of the monitor within the provided time window.
+ ///
+ public partial class HealthMonitorStateChangeList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeList FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitorStateChangeList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitorStateChangeList(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChange) (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChange.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.PowerShell.cs
new file mode 100644
index 000000000000..043fd067d7b9
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.PowerShell.cs
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Properties of the monitor.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangePropertiesTypeConverter))]
+ public partial class HealthMonitorStateChangeProperties
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new HealthMonitorStateChangeProperties(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new HealthMonitorStateChangeProperties(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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal HealthMonitorStateChangeProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal HealthMonitorStateChangeProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MonitorName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorName = (string) content.GetValueForProperty("MonitorName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorType = (string) content.GetValueForProperty("MonitorType",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorType, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitoredObject"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitoredObject = (string) content.GetValueForProperty("MonitoredObject",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitoredObject, global::System.Convert.ToString);
+ }
+ if (content.Contains("EvaluationTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).EvaluationTimestamp = (string) content.GetValueForProperty("EvaluationTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).EvaluationTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("CurrentStateFirstObservedTimestamp"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentStateFirstObservedTimestamp = (string) content.GetValueForProperty("CurrentStateFirstObservedTimestamp",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentStateFirstObservedTimestamp, global::System.Convert.ToString);
+ }
+ if (content.Contains("PreviousMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).PreviousMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("PreviousMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).PreviousMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("CurrentMonitorState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentMonitorState = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState?) content.GetValueForProperty("CurrentMonitorState",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).CurrentMonitorState, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState.CreateFrom);
+ }
+ if (content.Contains("Evidence"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).Evidence = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("Evidence",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).Evidence, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("MonitorConfiguration"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) content.GetValueForProperty("MonitorConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal)this).MonitorConfiguration, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.AnyTypeConverter.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Properties of the monitor.
+ [System.ComponentModel.TypeConverter(typeof(HealthMonitorStateChangePropertiesTypeConverter))]
+ public partial interface IHealthMonitorStateChangeProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.TypeConverter.cs
new file mode 100644
index 000000000000..715af15825f1
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.TypeConverter.cs
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class HealthMonitorStateChangePropertiesTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return HealthMonitorStateChangeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChangeProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return HealthMonitorStateChangeProperties.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/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.cs
new file mode 100644
index 000000000000..dc198f9a9f71
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.cs
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Properties of the monitor.
+ public partial class HealthMonitorStateChangeProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? _currentMonitorState;
+
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get => this._currentMonitorState; }
+
+ /// Backing field for property.
+ private string _currentStateFirstObservedTimestamp;
+
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string CurrentStateFirstObservedTimestamp { get => this._currentStateFirstObservedTimestamp; set => this._currentStateFirstObservedTimestamp = value; }
+
+ /// Backing field for property.
+ private string _evaluationTimestamp;
+
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string EvaluationTimestamp { get => this._evaluationTimestamp; set => this._evaluationTimestamp = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny _evidence;
+
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get => (this._evidence = this._evidence ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any()); set => this._evidence = value; }
+
+ /// Internal Acessors for CurrentMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal.CurrentMonitorState { get => this._currentMonitorState; set { {_currentMonitorState = value;} } }
+
+ /// Internal Acessors for PreviousMonitorState
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangePropertiesInternal.PreviousMonitorState { get => this._previousMonitorState; set { {_previousMonitorState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny _monitorConfiguration;
+
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get => (this._monitorConfiguration = this._monitorConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any()); set => this._monitorConfiguration = value; }
+
+ /// Backing field for property.
+ private string _monitorName;
+
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitorName { get => this._monitorName; set => this._monitorName = value; }
+
+ /// Backing field for property.
+ private string _monitorType;
+
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitorType { get => this._monitorType; set => this._monitorType = value; }
+
+ /// Backing field for property.
+ private string _monitoredObject;
+
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitoredObject { get => this._monitoredObject; set => this._monitoredObject = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? _previousMonitorState;
+
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get => this._previousMonitorState; }
+
+ /// Creates an new instance.
+ public HealthMonitorStateChangeProperties()
+ {
+
+ }
+ }
+ /// Properties of the monitor.
+ public partial interface IHealthMonitorStateChangeProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Current health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Current health state of the monitor.",
+ SerializedName = @"currentMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; }
+ /// Timestamp of the monitor's last health state change.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health state change.",
+ SerializedName = @"currentStateFirstObservedTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Timestamp of the monitor's last health evaluation.",
+ SerializedName = @"evaluationTimestamp",
+ PossibleTypes = new [] { typeof(string) })]
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Evidence validating the monitor's current health state.",
+ SerializedName = @"evidence",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The configuration settings at the time of the monitor's health evaluation.",
+ SerializedName = @"monitorConfiguration",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Human-readable name of the monitor.",
+ SerializedName = @"monitorName",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of the monitor.",
+ SerializedName = @"monitorType",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Dynamic monitored object of the monitor.",
+ SerializedName = @"monitoredObject",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitoredObject { get; set; }
+ /// Previous health state of the monitor.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Previous health state of the monitor.",
+ SerializedName = @"previousMonitorState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; }
+
+ }
+ /// Properties of the monitor.
+ internal partial interface IHealthMonitorStateChangePropertiesInternal
+
+ {
+ /// Current health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? CurrentMonitorState { get; set; }
+ /// Timestamp of the monitor's last health state change.
+ string CurrentStateFirstObservedTimestamp { get; set; }
+ /// Timestamp of the monitor's last health evaluation.
+ string EvaluationTimestamp { get; set; }
+ /// Evidence validating the monitor's current health state.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny Evidence { get; set; }
+ /// The configuration settings at the time of the monitor's health evaluation.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IAny MonitorConfiguration { get; set; }
+ /// Human-readable name of the monitor.
+ string MonitorName { get; set; }
+ /// Type of the monitor.
+ string MonitorType { get; set; }
+ /// Dynamic monitored object of the monitor.
+ string MonitoredObject { get; set; }
+ /// Previous health state of the monitor.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState? PreviousMonitorState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.json.cs
new file mode 100644
index 000000000000..cfb81c44fde6
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/HealthMonitorStateChangeProperties.json.cs
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Properties of the monitor.
+ public partial class HealthMonitorStateChangeProperties
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IHealthMonitorStateChangeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new HealthMonitorStateChangeProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal HealthMonitorStateChangeProperties(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_monitorName = If( json?.PropertyT("monitorName"), out var __jsonMonitorName) ? (string)__jsonMonitorName : (string)MonitorName;}
+ {_monitorType = If( json?.PropertyT("monitorType"), out var __jsonMonitorType) ? (string)__jsonMonitorType : (string)MonitorType;}
+ {_monitoredObject = If( json?.PropertyT("monitoredObject"), out var __jsonMonitoredObject) ? (string)__jsonMonitoredObject : (string)MonitoredObject;}
+ {_evaluationTimestamp = If( json?.PropertyT("evaluationTimestamp"), out var __jsonEvaluationTimestamp) ? (string)__jsonEvaluationTimestamp : (string)EvaluationTimestamp;}
+ {_currentStateFirstObservedTimestamp = If( json?.PropertyT("currentStateFirstObservedTimestamp"), out var __jsonCurrentStateFirstObservedTimestamp) ? (string)__jsonCurrentStateFirstObservedTimestamp : (string)CurrentStateFirstObservedTimestamp;}
+ {_previousMonitorState = If( json?.PropertyT("previousMonitorState"), out var __jsonPreviousMonitorState) ? (string)__jsonPreviousMonitorState : (string)PreviousMonitorState;}
+ {_currentMonitorState = If( json?.PropertyT("currentMonitorState"), out var __jsonCurrentMonitorState) ? (string)__jsonCurrentMonitorState : (string)CurrentMonitorState;}
+ {_evidence = If( json?.PropertyT("evidence"), out var __jsonEvidence) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any.FromJson(__jsonEvidence) : Evidence;}
+ {_monitorConfiguration = If( json?.PropertyT("monitorConfiguration"), out var __jsonMonitorConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Any.FromJson(__jsonMonitorConfiguration) : MonitorConfiguration;}
+ 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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._monitorName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitorName.ToString()) : null, "monitorName" ,container.Add );
+ AddIf( null != (((object)this._monitorType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitorType.ToString()) : null, "monitorType" ,container.Add );
+ AddIf( null != (((object)this._monitoredObject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitoredObject.ToString()) : null, "monitoredObject" ,container.Add );
+ AddIf( null != (((object)this._evaluationTimestamp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._evaluationTimestamp.ToString()) : null, "evaluationTimestamp" ,container.Add );
+ AddIf( null != (((object)this._currentStateFirstObservedTimestamp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._currentStateFirstObservedTimestamp.ToString()) : null, "currentStateFirstObservedTimestamp" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._previousMonitorState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._previousMonitorState.ToString()) : null, "previousMonitorState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._currentMonitorState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._currentMonitorState.ToString()) : null, "currentMonitorState" ,container.Add );
+ }
+ AddIf( null != this._evidence ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) this._evidence.ToJson(null,serializationMode) : null, "evidence" ,container.Add );
+ AddIf( null != this._monitorConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) this._monitorConfiguration.ToJson(null,serializationMode) : null, "monitorConfiguration" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.PowerShell.cs
new file mode 100644
index 000000000000..58b80347652c
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.PowerShell.cs
@@ -0,0 +1,194 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// Operation supported by the 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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Operation supported by the resource provider.
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..98aefdf27510
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.cs
new file mode 100644
index 000000000000..d8f993be4ccb
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Operation supported by the resource provider.
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay _display;
+
+ /// The localized display information for this particular operation or action.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplay()); set => this._display = value; }
+
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Description = value ; }
+
+ /// Human-readable, friendly name for the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Operation = value ; }
+
+ /// Operation resource provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Provider = value ; }
+
+ /// Resource on which the operation is performed.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)Display).Resource = value ; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplay()); set { {_display = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the operation being performed on this particular object.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Backing field for property.
+ private string _origin;
+
+ /// The intended executor of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Origin { get => this._origin; set => this._origin = value; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// Operation supported by the resource provider.
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Operation description.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+ /// Human-readable, friendly name for the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Human-readable, friendly name for the operation.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+ /// Operation resource provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Operation resource provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+ /// Resource on which the operation is performed.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Resource on which the operation is performed.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+ /// The name of the operation being performed on this particular object.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The name of the operation being performed on this particular object.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+ /// The intended executor of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The intended executor of the operation.",
+ SerializedName = @"origin",
+ PossibleTypes = new [] { typeof(string) })]
+ string Origin { get; set; }
+
+ }
+ /// Operation supported by the resource provider.
+ internal partial interface IOperationInternal
+
+ {
+ /// The localized display information for this particular operation or action.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay Display { get; set; }
+ /// Operation description.
+ string DisplayDescription { get; set; }
+ /// Human-readable, friendly name for the operation.
+ string DisplayOperation { get; set; }
+ /// Operation resource provider name.
+ string DisplayProvider { get; set; }
+ /// Resource on which the operation is performed.
+ string DisplayResource { get; set; }
+ /// The name of the operation being performed on this particular object.
+ string Name { get; set; }
+ /// The intended executor of the operation.
+ string Origin { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.json.cs
new file mode 100644
index 000000000000..cb10db3b4c32
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Operation.json.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// Operation supported by the 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;}
+ 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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..2685087b9199
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.PowerShell.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// The localized display information for this particular operation or action.
+ [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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The localized display information for this particular operation or action.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..758ba4fb61f0
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.cs
new file mode 100644
index 000000000000..dc4c34d6c6e2
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// The localized display information for this particular operation or action.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ /// Human-readable, friendly name for the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ /// Operation resource provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ /// Resource on which the operation is performed.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// The localized display information for this particular operation or action.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Operation description.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Human-readable, friendly name for the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Human-readable, friendly name for the operation.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+ /// Operation resource provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Operation resource provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+ /// Resource on which the operation is performed.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Resource on which the operation is performed.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ /// The localized display information for this particular operation or action.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ /// Operation description.
+ string Description { get; set; }
+ /// Human-readable, friendly name for the operation.
+ string Operation { get; set; }
+ /// Operation resource provider name.
+ string Provider { get; set; }
+ /// Resource on which the operation is performed.
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationDisplay.json.cs
new file mode 100644
index 000000000000..632090248cd6
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// The localized display information for this particular operation or action.
+ 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.PowerShell.cs
new file mode 100644
index 000000000000..34cec1f42486
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ /// List of available REST API operations
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial class OperationList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationList(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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationList(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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationList(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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)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 OperationList(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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// List of available REST API operations
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial interface IOperationList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.TypeConverter.cs
new file mode 100644
index 000000000000..d8ae096388cc
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationListTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationList.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/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.cs
new file mode 100644
index 000000000000..a7bacf80a78e
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// List of available REST API operations
+ public partial class OperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[] _value;
+
+ /// Array of available REST API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public OperationList()
+ {
+
+ }
+ }
+ /// List of available REST API operations
+ public partial interface IOperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Link to next page if the list is too long.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Link to next page if the list is too long.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// Array of available REST API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Array of available REST API operations.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[] Value { get; set; }
+
+ }
+ /// List of available REST API operations
+ internal partial interface IOperationListInternal
+
+ {
+ /// Link to next page if the list is too long.
+ string NextLink { get; set; }
+ /// Array of available REST API operations.
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.json.cs
new file mode 100644
index 000000000000..e24a92dd8b9d
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/OperationList.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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ /// List of available REST API operations
+ public partial class OperationList
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new OperationList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.Operation.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.PowerShell.cs
new file mode 100644
index 000000000000..48df822a8a29
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ ///
+ [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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial interface IResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.TypeConverter.cs
new file mode 100644
index 000000000000..47a8927158df
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.Api20200113Preview.IResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.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/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.cs
new file mode 100644
index 000000000000..9da677766835
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.cs
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ ///
+ public partial class Resource :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// The resource Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public Resource()
+ {
+
+ }
+ }
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ public partial interface IResource :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// The resource Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The resource Id.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The resource name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ internal partial interface IResourceInternal
+
+ {
+ /// The resource Id.
+ string Id { get; set; }
+ /// The resource name.
+ string Name { get; set; }
+ /// The resource type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.json.cs b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/Resource.json.cs
new file mode 100644
index 000000000000..c446eecd8a87
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/Api20200113Preview/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.WorkloadMonitorApi.Models.Api20200113Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for the ARM proxy resource, 'microsoft.workloadmonitor/monitors'.
+ ///
+ 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new Resource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.PowerShell.cs b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.PowerShell.cs
new file mode 100644
index 000000000000..e9765f1b3e64
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.PowerShell.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(WorkloadMonitorApiIdentityTypeConverter))]
+ public partial class WorkloadMonitorApiIdentity
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new WorkloadMonitorApiIdentity(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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new WorkloadMonitorApiIdentity(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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal WorkloadMonitorApiIdentity(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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProviderName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ProviderName = (string) content.GetValueForProperty("ProviderName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ProviderName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceCollectionName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceCollectionName = (string) content.GetValueForProperty("ResourceCollectionName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceCollectionName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceName = (string) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).MonitorId = (string) content.GetValueForProperty("MonitorId",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).MonitorId, global::System.Convert.ToString);
+ }
+ if (content.Contains("TimestampUnix"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).TimestampUnix = (string) content.GetValueForProperty("TimestampUnix",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).TimestampUnix, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)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 WorkloadMonitorApiIdentity(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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProviderName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ProviderName = (string) content.GetValueForProperty("ProviderName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ProviderName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceCollectionName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceCollectionName = (string) content.GetValueForProperty("ResourceCollectionName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceCollectionName, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceName = (string) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).ResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MonitorId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).MonitorId = (string) content.GetValueForProperty("MonitorId",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).MonitorId, global::System.Convert.ToString);
+ }
+ if (content.Contains("TimestampUnix"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).TimestampUnix = (string) content.GetValueForProperty("TimestampUnix",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).TimestampUnix, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal)this).Id, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(WorkloadMonitorApiIdentityTypeConverter))]
+ public partial interface IWorkloadMonitorApiIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..49c1957e0b0f
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.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.WorkloadMonitorApi.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class WorkloadMonitorApiIdentityTypeConverter : 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.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity 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 WorkloadMonitorApiIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return WorkloadMonitorApiIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return WorkloadMonitorApiIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return WorkloadMonitorApiIdentity.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/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.cs b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.cs
new file mode 100644
index 000000000000..b5b071f6e014
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.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.WorkloadMonitorApi.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ public partial class WorkloadMonitorApiIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _monitorId;
+
+ /// The monitor Id of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string MonitorId { get => this._monitorId; set => this._monitorId = value; }
+
+ /// Backing field for property.
+ private string _providerName;
+
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string ProviderName { get => this._providerName; set => this._providerName = value; }
+
+ /// Backing field for property.
+ private string _resourceCollectionName;
+
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string ResourceCollectionName { get => this._resourceCollectionName; set => this._resourceCollectionName = value; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The resource group of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string _resourceName;
+
+ /// The name of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string ResourceName { get => this._resourceName; set => this._resourceName = value; }
+
+ /// Backing field for property.
+ private string _subscriptionId;
+
+ /// The subscription Id of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ /// Backing field for property.
+ private string _timestampUnix;
+
+ /// The timestamp of the state change (unix format).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Origin(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.PropertyOrigin.Owned)]
+ public string TimestampUnix { get => this._timestampUnix; set => this._timestampUnix = value; }
+
+ /// Creates an new instance.
+ public WorkloadMonitorApiIdentity()
+ {
+
+ }
+ }
+ public partial interface IWorkloadMonitorApiIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IJsonSerializable
+ {
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// The monitor Id of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The monitor Id of the virtual machine.",
+ SerializedName = @"monitorId",
+ PossibleTypes = new [] { typeof(string) })]
+ string MonitorId { get; set; }
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The provider name (ex: Microsoft.Compute for virtual machines).",
+ SerializedName = @"providerName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ProviderName { get; set; }
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The resource collection name (ex: virtualMachines for virtual machines).",
+ SerializedName = @"resourceCollectionName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceCollectionName { get; set; }
+ /// The resource group of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The resource group of the virtual machine.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceGroupName { get; set; }
+ /// The name of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the virtual machine.",
+ SerializedName = @"resourceName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceName { get; set; }
+ /// The subscription Id of the virtual machine.
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The subscription Id of the virtual machine.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SubscriptionId { get; set; }
+ /// The timestamp of the state change (unix format).
+ [Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of the state change (unix format).",
+ SerializedName = @"timestampUnix",
+ PossibleTypes = new [] { typeof(string) })]
+ string TimestampUnix { get; set; }
+
+ }
+ internal partial interface IWorkloadMonitorApiIdentityInternal
+
+ {
+ /// Resource identity path
+ string Id { get; set; }
+ /// The monitor Id of the virtual machine.
+ string MonitorId { get; set; }
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ string ProviderName { get; set; }
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ string ResourceCollectionName { get; set; }
+ /// The resource group of the virtual machine.
+ string ResourceGroupName { get; set; }
+ /// The name of the virtual machine.
+ string ResourceName { get; set; }
+ /// The subscription Id of the virtual machine.
+ string SubscriptionId { get; set; }
+ /// The timestamp of the state change (unix format).
+ string TimestampUnix { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.json.cs b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.json.cs
new file mode 100644
index 000000000000..adcff607441c
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Models/WorkloadMonitorApiIdentity.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.WorkloadMonitorApi.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ public partial class WorkloadMonitorApiIdentity
+ {
+
+ ///
+ /// 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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.IWorkloadMonitorApiIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject json ? new WorkloadMonitorApiIdentity(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.WorkloadMonitorApi.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
+ AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add );
+ AddIf( null != (((object)this._providerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._providerName.ToString()) : null, "providerName" ,container.Add );
+ AddIf( null != (((object)this._resourceCollectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._resourceCollectionName.ToString()) : null, "resourceCollectionName" ,container.Add );
+ AddIf( null != (((object)this._resourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._resourceName.ToString()) : null, "resourceName" ,container.Add );
+ AddIf( null != (((object)this._monitorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._monitorId.ToString()) : null, "monitorId" ,container.Add );
+ AddIf( null != (((object)this._timestampUnix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._timestampUnix.ToString()) : null, "timestampUnix" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonObject instance to deserialize from.
+ internal WorkloadMonitorApiIdentity(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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;}
+ {_providerName = If( json?.PropertyT("providerName"), out var __jsonProviderName) ? (string)__jsonProviderName : (string)ProviderName;}
+ {_resourceCollectionName = If( json?.PropertyT("resourceCollectionName"), out var __jsonResourceCollectionName) ? (string)__jsonResourceCollectionName : (string)ResourceCollectionName;}
+ {_resourceName = If( json?.PropertyT("resourceName"), out var __jsonResourceName) ? (string)__jsonResourceName : (string)ResourceName;}
+ {_monitorId = If( json?.PropertyT("monitorId"), out var __jsonMonitorId) ? (string)__jsonMonitorId : (string)MonitorId;}
+ {_timestampUnix = If( json?.PropertyT("timestampUnix"), out var __jsonTimestampUnix) ? (string)__jsonTimestampUnix : (string)TimestampUnix;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Support/HealthState.Completer.cs b/swaggerci/workloadmonitor/generated/api/Support/HealthState.Completer.cs
new file mode 100644
index 000000000000..0915e408f98d
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Support/HealthState.Completer.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support
+{
+
+ /// One of health states - healthy, critical, warning, unknown, none, disabled.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthStateTypeConverter))]
+ public partial struct HealthState :
+ 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) || "Healthy".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Healthy'", "Healthy", global::System.Management.Automation.CompletionResultType.ParameterValue, "Healthy");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Critical".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Critical'", "Critical", global::System.Management.Automation.CompletionResultType.ParameterValue, "Critical");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning");
+ }
+ 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");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/Support/HealthState.TypeConverter.cs b/swaggerci/workloadmonitor/generated/api/Support/HealthState.TypeConverter.cs
new file mode 100644
index 000000000000..dfac85c5bbe6
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Support/HealthState.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.WorkloadMonitorApi.Support
+{
+
+ /// One of health states - healthy, critical, warning, unknown, none, disabled.
+ public partial class HealthStateTypeConverter :
+ 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) => HealthState.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/workloadmonitor/generated/api/Support/HealthState.cs b/swaggerci/workloadmonitor/generated/api/Support/HealthState.cs
new file mode 100644
index 000000000000..0c1070feeac2
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/Support/HealthState.cs
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support
+{
+
+ /// One of health states - healthy, critical, warning, unknown, none, disabled.
+ public partial struct HealthState :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState Critical = @"Critical";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState Disabled = @"Disabled";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState Healthy = @"Healthy";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState None = @"None";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState Unknown = @"Unknown";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState Warning = @"Warning";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to HealthState
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new HealthState(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type HealthState
+ /// 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.WorkloadMonitorApi.Support.HealthState e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type HealthState (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 HealthState && Equals((HealthState)obj);
+ }
+
+ /// Returns hashCode for enum HealthState
+ /// 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 HealthState(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for HealthState
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to HealthState
+ /// the value to convert to an instance of .
+
+ public static implicit operator HealthState(string value)
+ {
+ return new HealthState(value);
+ }
+
+ /// Implicit operator to convert HealthState to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum HealthState
+ /// 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.WorkloadMonitorApi.Support.HealthState e1, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum HealthState
+ /// 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.WorkloadMonitorApi.Support.HealthState e1, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Support.HealthState e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/workloadmonitor/generated/api/WorkloadMonitorApi.cs b/swaggerci/workloadmonitor/generated/api/WorkloadMonitorApi.cs
new file mode 100644
index 000000000000..a975b3f2ecf3
--- /dev/null
+++ b/swaggerci/workloadmonitor/generated/api/WorkloadMonitorApi.cs
@@ -0,0 +1,1014 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the Workload Monitor API service.
+ /// Workload Monitor API
+ ///
+ public partial class WorkloadMonitorApi
+ {
+
+ ///
+ /// Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the monitor's evidence
+ /// and configuration).
+ ///
+ /// The subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsGet(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/"
+ + global::System.Uri.EscapeDataString(providerName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceCollectionName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceName)
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + global::System.Uri.EscapeDataString(monitorId)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter: $expand (retrieve
+ /// the monitor's evidence and configuration).
+ ///
+ /// The subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// The timestamp of the state change (unix format).
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsGetStateChange(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string timestampUnix, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/"
+ + global::System.Uri.EscapeDataString(providerName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceCollectionName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceName)
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + global::System.Uri.EscapeDataString(monitorId)
+ + "/history/"
+ + global::System.Uri.EscapeDataString(timestampUnix)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsGetStateChange_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter: $expand (retrieve
+ /// the monitor's evidence and configuration).
+ ///
+ ///
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsGetStateChangeViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.WorkloadMonitor/monitors/(?[^/]+)/history/(?[^/]+)$", 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/{providerName}/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history/{timestampUnix}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var providerName = _match.Groups["providerName"].Value;
+ var resourceCollectionName = _match.Groups["resourceCollectionName"].Value;
+ var resourceName = _match.Groups["resourceName"].Value;
+ var monitorId = _match.Groups["monitorId"].Value;
+ var timestampUnix = _match.Groups["timestampUnix"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/"
+ + providerName
+ + "/"
+ + resourceCollectionName
+ + "/"
+ + resourceName
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + monitorId
+ + "/history/"
+ + timestampUnix
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsGetStateChange_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.WorkloadMonitorApi.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 HealthMonitorsGetStateChange_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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChange.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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 subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// The timestamp of the state change (unix format).
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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 HealthMonitorsGetStateChange_Validate(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string timestampUnix, string Expand, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(providerName),providerName);
+ await eventListener.AssertNotNull(nameof(resourceCollectionName),resourceCollectionName);
+ await eventListener.AssertNotNull(nameof(resourceName),resourceName);
+ await eventListener.AssertNotNull(nameof(monitorId),monitorId);
+ await eventListener.AssertNotNull(nameof(timestampUnix),timestampUnix);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the monitor's evidence
+ /// and configuration).
+ ///
+ ///
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsGetViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.WorkloadMonitor/monitors/(?[^/]+)$", 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/{providerName}/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var providerName = _match.Groups["providerName"].Value;
+ var resourceCollectionName = _match.Groups["resourceCollectionName"].Value;
+ var resourceName = _match.Groups["resourceName"].Value;
+ var monitorId = _match.Groups["monitorId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/"
+ + providerName
+ + "/"
+ + resourceCollectionName
+ + "/"
+ + resourceName
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + monitorId
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsGet_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.WorkloadMonitorApi.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 HealthMonitorsGet_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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitor.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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 subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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 HealthMonitorsGet_Validate(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string Expand, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(providerName),providerName);
+ await eventListener.AssertNotNull(nameof(resourceCollectionName),resourceCollectionName);
+ await eventListener.AssertNotNull(nameof(resourceName),resourceName);
+ await eventListener.AssertNotNull(nameof(monitorId),monitorId);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the monitor's
+ /// evidence and configuration) and $filter (filter by monitor name).
+ ///
+ /// The subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// Optionally filter by monitor name. Example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb.'
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsList(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, 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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/"
+ + global::System.Uri.EscapeDataString(providerName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceCollectionName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceName)
+ + "/providers/Microsoft.WorkloadMonitor/monitors"
+ + "?"
+ + "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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Get the health state changes of a monitor of a virtual machine within the provided time window (default is the last 24
+ /// hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter (filter by heartbeat
+ /// condition).
+ ///
+ /// The subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// The start of the time window.
+ /// The end of the time window.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsListStateChanges(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string Filter, string Expand, global::System.DateTime? startTimestampUtc, global::System.DateTime? endTimestampUtc, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/"
+ + global::System.Uri.EscapeDataString(providerName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceCollectionName)
+ + "/"
+ + global::System.Uri.EscapeDataString(resourceName)
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + global::System.Uri.EscapeDataString(monitorId)
+ + "/history"
+ + "?"
+ + "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))
+ + "&"
+ + (null == startTimestampUtc ? global::System.String.Empty : "startTimestampUtc=" + startTimestampUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture))
+ + "&"
+ + (null == endTimestampUtc ? global::System.String.Empty : "endTimestampUtc=" + endTimestampUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsListStateChanges_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Get the health state changes of a monitor of a virtual machine within the provided time window (default is the last 24
+ /// hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter (filter by heartbeat
+ /// condition).
+ ///
+ ///
+ /// Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// The start of the time window.
+ /// The end of the time window.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsListStateChangesViaIdentity(global::System.String viaIdentity, string Filter, string Expand, global::System.DateTime? startTimestampUtc, global::System.DateTime? endTimestampUtc, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.WorkloadMonitor/monitors/(?[^/]+)/history$", 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/{providerName}/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var providerName = _match.Groups["providerName"].Value;
+ var resourceCollectionName = _match.Groups["resourceCollectionName"].Value;
+ var resourceName = _match.Groups["resourceName"].Value;
+ var monitorId = _match.Groups["monitorId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/"
+ + providerName
+ + "/"
+ + resourceCollectionName
+ + "/"
+ + resourceName
+ + "/providers/Microsoft.WorkloadMonitor/monitors/"
+ + monitorId
+ + "/history"
+ + "?"
+ + "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))
+ + "&"
+ + (null == startTimestampUtc ? global::System.String.Empty : "startTimestampUtc=" + startTimestampUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture))
+ + "&"
+ + (null == endTimestampUtc ? global::System.String.Empty : "endTimestampUtc=" + endTimestampUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsListStateChanges_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.WorkloadMonitorApi.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 HealthMonitorsListStateChanges_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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorStateChangeList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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 subscription Id of the virtual machine.
+ /// The resource group of the virtual machine.
+ /// The provider name (ex: Microsoft.Compute for virtual machines).
+ /// The resource collection name (ex: virtualMachines for virtual machines).
+ /// The name of the virtual machine.
+ /// The monitor Id of the virtual machine.
+ /// Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// The start of the time window.
+ /// The end of the time window.
+ /// 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 HealthMonitorsListStateChanges_Validate(string subscriptionId, string resourceGroupName, string providerName, string resourceCollectionName, string resourceName, string monitorId, string Filter, string Expand, global::System.DateTime? startTimestampUtc, global::System.DateTime? endTimestampUtc, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(providerName),providerName);
+ await eventListener.AssertNotNull(nameof(resourceCollectionName),resourceCollectionName);
+ await eventListener.AssertNotNull(nameof(resourceName),resourceName);
+ await eventListener.AssertNotNull(nameof(monitorId),monitorId);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(Expand),Expand);
+ }
+ }
+
+ ///
+ /// Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the monitor's
+ /// evidence and configuration) and $filter (filter by monitor name).
+ ///
+ ///
+ /// Optionally filter by monitor name. Example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb.'
+ /// Optionally expand the monitor’s evidence and/or configuration. Example: $expand=evidence,configuration.
+ /// 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.WorkloadMonitorApi.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 HealthMonitorsListViaIdentity(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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-13-preview";
+ // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.WorkloadMonitor/monitors$", 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/{providerName}/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var providerName = _match.Groups["providerName"].Value;
+ var resourceCollectionName = _match.Groups["resourceCollectionName"].Value;
+ var resourceName = _match.Groups["resourceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/"
+ + providerName
+ + "/"
+ + resourceCollectionName
+ + "/"
+ + resourceName
+ + "/providers/Microsoft.WorkloadMonitor/monitors"
+ + "?"
+ + "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.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.HealthMonitorsList_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.WorkloadMonitorApi.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 HealthMonitorsList_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.WorkloadMonitorApi.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.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.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.HealthMonitorList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Models.Api20200113Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.WorkloadMonitorApi.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for