diff --git a/swaggerci/windowsesu/.gitattributes b/swaggerci/windowsesu/.gitattributes
new file mode 100644
index 000000000000..2125666142eb
--- /dev/null
+++ b/swaggerci/windowsesu/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file
diff --git a/swaggerci/windowsesu/.gitignore b/swaggerci/windowsesu/.gitignore
new file mode 100644
index 000000000000..7998f37e1e47
--- /dev/null
+++ b/swaggerci/windowsesu/.gitignore
@@ -0,0 +1,5 @@
+bin
+obj
+.vs
+tools
+test/*-TestResults.xml
\ No newline at end of file
diff --git a/swaggerci/windowsesu/Az.Windowsesu.csproj b/swaggerci/windowsesu/Az.Windowsesu.csproj
new file mode 100644
index 000000000000..738431f8256b
--- /dev/null
+++ b/swaggerci/windowsesu/Az.Windowsesu.csproj
@@ -0,0 +1,44 @@
+
+
+
+ 0.1.0
+ 7.1
+ netstandard2.0
+ Library
+ Az.Windowsesu.private
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu
+ true
+ false
+ ./bin
+ $(OutputPath)
+ Az.Windowsesu.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/windowsesu/Az.Windowsesu.format.ps1xml b/swaggerci/windowsesu/Az.Windowsesu.format.ps1xml
new file mode 100644
index 000000000000..212996f3df7f
--- /dev/null
+++ b/swaggerci/windowsesu/Az.Windowsesu.format.ps1xml
@@ -0,0 +1,401 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.WindowsesuIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.WindowsesuIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ MultipleActivationKeyName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinition
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinition
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKey
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Location
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AgreementNumber
+
+
+ ExpirationDate
+
+
+ InstalledServerNumber
+
+
+ IsEligible
+
+
+ MultipleActivationKey
+
+
+ OSType
+
+
+ ProvisioningState
+
+
+ SupportType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.Operation
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+
+
+ Name
+
+
+ Type
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/swaggerci/windowsesu/Az.Windowsesu.nuspec b/swaggerci/windowsesu/Az.Windowsesu.nuspec
new file mode 100644
index 000000000000..cbfbd839adb4
--- /dev/null
+++ b/swaggerci/windowsesu/Az.Windowsesu.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Az.Windowsesu
+ 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/windowsesu/Az.Windowsesu.psd1 b/swaggerci/windowsesu/Az.Windowsesu.psd1
new file mode 100644
index 000000000000..42d0be867fe9
--- /dev/null
+++ b/swaggerci/windowsesu/Az.Windowsesu.psd1
@@ -0,0 +1,24 @@
+@{
+ GUID = '2252b567-3306-4ebe-a632-9a378d1fa9d7'
+ RootModule = './Az.Windowsesu.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: Windowsesu cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.Windowsesu.private.dll'
+ FormatsToProcess = './Az.Windowsesu.format.ps1xml'
+ FunctionsToExport = 'Get-AzWindowsesuMultipleActivationKey', 'New-AzWindowsesuMultipleActivationKey', 'Remove-AzWindowsesuMultipleActivationKey', 'Update-AzWindowsesuMultipleActivationKey', '*'
+ AliasesToExport = '*'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Windowsesu'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
+}
diff --git a/swaggerci/windowsesu/Az.Windowsesu.psm1 b/swaggerci/windowsesu/Az.Windowsesu.psm1
new file mode 100644
index 000000000000..9a92d886636b
--- /dev/null
+++ b/swaggerci/windowsesu/Az.Windowsesu.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.Windowsesu.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/MSSharedLibKey.snk b/swaggerci/windowsesu/MSSharedLibKey.snk
new file mode 100644
index 000000000000..695f1b38774e
Binary files /dev/null and b/swaggerci/windowsesu/MSSharedLibKey.snk differ
diff --git a/swaggerci/windowsesu/README.md b/swaggerci/windowsesu/README.md
new file mode 100644
index 000000000000..33bc2ce2942f
--- /dev/null
+++ b/swaggerci/windowsesu/README.md
@@ -0,0 +1,27 @@
+
+# Az.Windowsesu
+This directory contains the PowerShell module for the Windowsesu service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.Windowsesu/)
+
+## 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.Windowsesu`, see [how-to.md](how-to.md).
+
diff --git a/swaggerci/windowsesu/build-module.ps1 b/swaggerci/windowsesu/build-module.ps1
new file mode 100644
index 000000000000..55ece3577f0f
--- /dev/null
+++ b/swaggerci/windowsesu/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.Windowsesu.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.Windowsesu.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.Windowsesu.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.Windowsesu'
+$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: Windowsesu 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.Windowsesu.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/windowsesu/check-dependencies.ps1 b/swaggerci/windowsesu/check-dependencies.ps1
new file mode 100644
index 000000000000..ec3055201a71
--- /dev/null
+++ b/swaggerci/windowsesu/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/windowsesu/create-model-cmdlets.ps1 b/swaggerci/windowsesu/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..e241683683d7
--- /dev/null
+++ b/swaggerci/windowsesu/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 = 'Windowsesu'
+ $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/windowsesu/custom/Az.Windowsesu.custom.psm1 b/swaggerci/windowsesu/custom/Az.Windowsesu.custom.psm1
new file mode 100644
index 000000000000..af577e2799ed
--- /dev/null
+++ b/swaggerci/windowsesu/custom/Az.Windowsesu.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.Windowsesu.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.Windowsesu.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/windowsesu/custom/README.md b/swaggerci/windowsesu/custom/README.md
new file mode 100644
index 000000000000..27af6187a42e
--- /dev/null
+++ b/swaggerci/windowsesu/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.Windowsesu` 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.Windowsesu.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.Windowsesu` 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.Windowsesu.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.Windowsesu.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.Windowsesu`. 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.Windowsesu.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.Windowsesu.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Windowsesu`.
+- `Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Windowsesu`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/docs/Az.Windowsesu.md b/swaggerci/windowsesu/docs/Az.Windowsesu.md
new file mode 100644
index 000000000000..5530f8f0bc7c
--- /dev/null
+++ b/swaggerci/windowsesu/docs/Az.Windowsesu.md
@@ -0,0 +1,25 @@
+---
+Module Name: Az.Windowsesu
+Module Guid: 2252b567-3306-4ebe-a632-9a378d1fa9d7
+Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.windowsesu
+Help Version: 1.0.0.0
+Locale: en-US
+---
+
+# Az.Windowsesu Module
+## Description
+Microsoft Azure PowerShell: Windowsesu cmdlets
+
+## Az.Windowsesu Cmdlets
+### [Get-AzWindowsesuMultipleActivationKey](Get-AzWindowsesuMultipleActivationKey.md)
+Get a MAK key.
+
+### [New-AzWindowsesuMultipleActivationKey](New-AzWindowsesuMultipleActivationKey.md)
+Create a MAK key.
+
+### [Remove-AzWindowsesuMultipleActivationKey](Remove-AzWindowsesuMultipleActivationKey.md)
+Delete a MAK key.
+
+### [Update-AzWindowsesuMultipleActivationKey](Update-AzWindowsesuMultipleActivationKey.md)
+Update a MAK key.
+
diff --git a/swaggerci/windowsesu/docs/Get-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/docs/Get-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..06626a48323d
--- /dev/null
+++ b/swaggerci/windowsesu/docs/Get-AzWindowsesuMultipleActivationKey.md
@@ -0,0 +1,172 @@
+---
+external help file:
+Module Name: Az.Windowsesu
+online version: https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/get-azwindowsesumultipleactivationkey
+schema: 2.0.0
+---
+
+# Get-AzWindowsesuMultipleActivationKey
+
+## SYNOPSIS
+Get a MAK key.
+
+## SYNTAX
+
+### List (Default)
+```
+Get-AzWindowsesuMultipleActivationKey [-SubscriptionId ] [-DefaultProfile ]
+ []
+```
+
+### Get
+```
+Get-AzWindowsesuMultipleActivationKey -Name -ResourceGroupName [-SubscriptionId ]
+ [-DefaultProfile ] []
+```
+
+### GetViaIdentity
+```
+Get-AzWindowsesuMultipleActivationKey -InputObject [-DefaultProfile ]
+ []
+```
+
+### List1
+```
+Get-AzWindowsesuMultipleActivationKey -ResourceGroupName [-SubscriptionId ]
+ [-DefaultProfile ] []
+```
+
+## DESCRIPTION
+Get a MAK key.
+
+## 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
+```
+
+### -InputObject
+Identity Parameter
+To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+Parameter Sets: GetViaIdentity
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByValue)
+Accept wildcard characters: False
+```
+
+### -Name
+The name of the MAK key.
+
+```yaml
+Type: System.String
+Parameter Sets: Get
+Aliases: MultipleActivationKeyName
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The name of the resource group.
+The name is case insensitive.
+
+```yaml
+Type: System.String
+Parameter Sets: Get, List1
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The ID of the target subscription.
+
+```yaml
+Type: System.String[]
+Parameter Sets: Get, List, List1
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+
+## 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
+ - `[MultipleActivationKeyName ]`: The name of the MAK key.
+ - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive.
+ - `[SubscriptionId ]`: The ID of the target subscription.
+
+## RELATED LINKS
+
diff --git a/swaggerci/windowsesu/docs/New-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/docs/New-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..522ec598c639
--- /dev/null
+++ b/swaggerci/windowsesu/docs/New-AzWindowsesuMultipleActivationKey.md
@@ -0,0 +1,292 @@
+---
+external help file:
+Module Name: Az.Windowsesu
+online version: https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/new-azwindowsesumultipleactivationkey
+schema: 2.0.0
+---
+
+# New-AzWindowsesuMultipleActivationKey
+
+## SYNOPSIS
+Create a MAK key.
+
+## SYNTAX
+
+```
+New-AzWindowsesuMultipleActivationKey -Name -ResourceGroupName -Location
+ [-SubscriptionId ] [-AgreementNumber ] [-InstalledServerNumber ] [-IsEligible]
+ [-OSType ] [-SupportType ] [-Tag ] [-DefaultProfile ] [-AsJob]
+ [-NoWait] [-Confirm] [-WhatIf] []
+```
+
+## DESCRIPTION
+Create a MAK key.
+
+## 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
+
+### -AgreementNumber
+Agreement number under which the key is requested.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -AsJob
+Run the command as a job
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -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
+```
+
+### -InstalledServerNumber
+Number of activations/servers using the MAK key.
+
+```yaml
+Type: System.Int32
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -IsEligible
+\ true \ if user has eligible on-premises Windows physical or virtual machines, and that the requested key will only be used in their organization; \ false \ otherwise.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Location
+The geo-location where the resource lives
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Name
+The name of the MAK key.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases: MultipleActivationKeyName
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -NoWait
+Run the command asynchronously
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -OSType
+Type of OS for which the key is requested.
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The name of the resource group.
+The name is case insensitive.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The ID of the target subscription.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SupportType
+Type of support
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Tag
+Resource tags.
+
+```yaml
+Type: System.Collections.Hashtable
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Confirm
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -WhatIf
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+
+## NOTES
+
+ALIASES
+
+## RELATED LINKS
+
diff --git a/swaggerci/windowsesu/docs/README.md b/swaggerci/windowsesu/docs/README.md
new file mode 100644
index 000000000000..06f0b8a61f04
--- /dev/null
+++ b/swaggerci/windowsesu/docs/README.md
@@ -0,0 +1,11 @@
+# Docs
+This directory contains the documentation of the cmdlets for the `Az.Windowsesu` 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.Windowsesu` 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/windowsesu/docs/Remove-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/docs/Remove-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..4622775ed7d8
--- /dev/null
+++ b/swaggerci/windowsesu/docs/Remove-AzWindowsesuMultipleActivationKey.md
@@ -0,0 +1,206 @@
+---
+external help file:
+Module Name: Az.Windowsesu
+online version: https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/remove-azwindowsesumultipleactivationkey
+schema: 2.0.0
+---
+
+# Remove-AzWindowsesuMultipleActivationKey
+
+## SYNOPSIS
+Delete a MAK key.
+
+## SYNTAX
+
+### Delete (Default)
+```
+Remove-AzWindowsesuMultipleActivationKey -Name -ResourceGroupName [-SubscriptionId ]
+ [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] []
+```
+
+### DeleteViaIdentity
+```
+Remove-AzWindowsesuMultipleActivationKey -InputObject [-DefaultProfile ]
+ [-PassThru] [-Confirm] [-WhatIf] []
+```
+
+## DESCRIPTION
+Delete a MAK key.
+
+## 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
+```
+
+### -InputObject
+Identity Parameter
+To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+Parameter Sets: DeleteViaIdentity
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByValue)
+Accept wildcard characters: False
+```
+
+### -Name
+The name of the MAK key.
+
+```yaml
+Type: System.String
+Parameter Sets: Delete
+Aliases: MultipleActivationKeyName
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -PassThru
+Returns true when the command succeeds
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The name of the resource group.
+The name is case insensitive.
+
+```yaml
+Type: System.String
+Parameter Sets: Delete
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The ID of the target subscription.
+
+```yaml
+Type: System.String
+Parameter Sets: Delete
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Confirm
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -WhatIf
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+
+## OUTPUTS
+
+### System.Boolean
+
+## 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
+ - `[MultipleActivationKeyName ]`: The name of the MAK key.
+ - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive.
+ - `[SubscriptionId ]`: The ID of the target subscription.
+
+## RELATED LINKS
+
diff --git a/swaggerci/windowsesu/docs/Update-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/docs/Update-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..ad78ae556f5f
--- /dev/null
+++ b/swaggerci/windowsesu/docs/Update-AzWindowsesuMultipleActivationKey.md
@@ -0,0 +1,206 @@
+---
+external help file:
+Module Name: Az.Windowsesu
+online version: https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/update-azwindowsesumultipleactivationkey
+schema: 2.0.0
+---
+
+# Update-AzWindowsesuMultipleActivationKey
+
+## SYNOPSIS
+Update a MAK key.
+
+## SYNTAX
+
+### UpdateExpanded (Default)
+```
+Update-AzWindowsesuMultipleActivationKey -Name -ResourceGroupName [-SubscriptionId ]
+ [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] []
+```
+
+### UpdateViaIdentityExpanded
+```
+Update-AzWindowsesuMultipleActivationKey -InputObject [-Tag ]
+ [-DefaultProfile ] [-Confirm] [-WhatIf] []
+```
+
+## DESCRIPTION
+Update a MAK key.
+
+## 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
+```
+
+### -InputObject
+Identity Parameter
+To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+
+```yaml
+Type: Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+Parameter Sets: UpdateViaIdentityExpanded
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByValue)
+Accept wildcard characters: False
+```
+
+### -Name
+The name of the MAK key.
+
+```yaml
+Type: System.String
+Parameter Sets: UpdateExpanded
+Aliases: MultipleActivationKeyName
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ResourceGroupName
+The name of the resource group.
+The name is case insensitive.
+
+```yaml
+Type: System.String
+Parameter Sets: UpdateExpanded
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -SubscriptionId
+The ID of the target subscription.
+
+```yaml
+Type: System.String
+Parameter Sets: UpdateExpanded
+Aliases:
+
+Required: False
+Position: Named
+Default value: (Get-AzContext).Subscription.Id
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Tag
+Resource tags.
+
+```yaml
+Type: System.Collections.Hashtable
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Confirm
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -WhatIf
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### CommonParameters
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+
+## OUTPUTS
+
+### Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+
+## 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
+ - `[MultipleActivationKeyName ]`: The name of the MAK key.
+ - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive.
+ - `[SubscriptionId ]`: The ID of the target subscription.
+
+## RELATED LINKS
+
diff --git a/swaggerci/windowsesu/examples/Get-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/examples/Get-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/windowsesu/examples/Get-AzWindowsesuMultipleActivationKey.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/windowsesu/examples/New-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/examples/New-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/windowsesu/examples/New-AzWindowsesuMultipleActivationKey.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/windowsesu/examples/Remove-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/examples/Remove-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/windowsesu/examples/Remove-AzWindowsesuMultipleActivationKey.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/windowsesu/examples/Update-AzWindowsesuMultipleActivationKey.md b/swaggerci/windowsesu/examples/Update-AzWindowsesuMultipleActivationKey.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/swaggerci/windowsesu/examples/Update-AzWindowsesuMultipleActivationKey.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/windowsesu/export-surface.ps1 b/swaggerci/windowsesu/export-surface.ps1
new file mode 100644
index 000000000000..1ed5518bd61b
--- /dev/null
+++ b/swaggerci/windowsesu/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.Windowsesu.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.Windowsesu'
+$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/windowsesu/exports/Get-AzWindowsesuMultipleActivationKey.ps1 b/swaggerci/windowsesu/exports/Get-AzWindowsesuMultipleActivationKey.ps1
new file mode 100644
index 000000000000..704397a89d55
--- /dev/null
+++ b/swaggerci/windowsesu/exports/Get-AzWindowsesuMultipleActivationKey.ps1
@@ -0,0 +1,197 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a MAK key.
+.Description
+Get a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.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
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/get-azwindowsesumultipleactivationkey
+#>
+function Get-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_Get';
+ GetViaIdentity = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_GetViaIdentity';
+ List = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_List';
+ List1 = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/exports/New-AzWindowsesuMultipleActivationKey.ps1 b/swaggerci/windowsesu/exports/New-AzWindowsesuMultipleActivationKey.ps1
new file mode 100644
index 000000000000..9abbcf700712
--- /dev/null
+++ b/swaggerci/windowsesu/exports/New-AzWindowsesuMultipleActivationKey.ps1
@@ -0,0 +1,229 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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 a MAK key.
+.Description
+Create a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/new-azwindowsesumultipleactivationkey
+#>
+function New-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.String]
+ # Agreement number under which the key is requested.
+ ${AgreementNumber},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.Int32]
+ # Number of activations/servers using the MAK key.
+ ${InstalledServerNumber},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # true if user has eligible on-premises Windows physical or virtual machines, and that the requested key will only be used in their organization; false otherwise.
+ ${IsEligible},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType]
+ # Type of OS for which the key is requested.
+ ${OSType},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType]
+ # Type of support
+ ${SupportType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Windowsesu.private\New-AzWindowsesuMultipleActivationKey_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/exports/ProxyCmdletDefinitions.ps1 b/swaggerci/windowsesu/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..6a74d812f0b1
--- /dev/null
+++ b/swaggerci/windowsesu/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,802 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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 a MAK key.
+.Description
+Get a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.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
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/get-azwindowsesumultipleactivationkey
+#>
+function Get-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_Get';
+ GetViaIdentity = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_GetViaIdentity';
+ List = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_List';
+ List1 = 'Az.Windowsesu.private\Get-AzWindowsesuMultipleActivationKey_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a MAK key.
+.Description
+Create a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/new-azwindowsesumultipleactivationkey
+#>
+function New-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.String]
+ # Agreement number under which the key is requested.
+ ${AgreementNumber},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.Int32]
+ # Number of activations/servers using the MAK key.
+ ${InstalledServerNumber},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # true if user has eligible on-premises Windows physical or virtual machines, and that the requested key will only be used in their organization; false otherwise.
+ ${IsEligible},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType]
+ # Type of OS for which the key is requested.
+ ${OSType},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType]
+ # Type of support
+ ${SupportType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Windowsesu.private\New-AzWindowsesuMultipleActivationKey_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Delete a MAK key.
+.Description
+Delete a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/remove-azwindowsesumultipleactivationkey
+#>
+function Remove-AzWindowsesuMultipleActivationKey {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.Windowsesu.private\Remove-AzWindowsesuMultipleActivationKey_Delete';
+ DeleteViaIdentity = 'Az.Windowsesu.private\Remove-AzWindowsesuMultipleActivationKey_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Update a MAK key.
+.Description
+Update a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.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
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/update-azwindowsesumultipleactivationkey
+#>
+function Update-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.Windowsesu.private\Update-AzWindowsesuMultipleActivationKey_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.Windowsesu.private\Update-AzWindowsesuMultipleActivationKey_UpdateViaIdentityExpanded';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/exports/README.md b/swaggerci/windowsesu/exports/README.md
new file mode 100644
index 000000000000..8cc0483aebe7
--- /dev/null
+++ b/swaggerci/windowsesu/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.Windowsesu`. No other cmdlets in this repository are directly exported. What that means is the `Az.Windowsesu` 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.Windowsesu.private.dll`) and from the `../custom/Az.Windowsesu.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.Windowsesu.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/windowsesu/exports/Remove-AzWindowsesuMultipleActivationKey.ps1 b/swaggerci/windowsesu/exports/Remove-AzWindowsesuMultipleActivationKey.ps1
new file mode 100644
index 000000000000..1a491ca05882
--- /dev/null
+++ b/swaggerci/windowsesu/exports/Remove-AzWindowsesuMultipleActivationKey.ps1
@@ -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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete a MAK key.
+.Description
+Delete a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/remove-azwindowsesumultipleactivationkey
+#>
+function Remove-AzWindowsesuMultipleActivationKey {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.Windowsesu.private\Remove-AzWindowsesuMultipleActivationKey_Delete';
+ DeleteViaIdentity = 'Az.Windowsesu.private\Remove-AzWindowsesuMultipleActivationKey_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/exports/Update-AzWindowsesuMultipleActivationKey.ps1 b/swaggerci/windowsesu/exports/Update-AzWindowsesuMultipleActivationKey.ps1
new file mode 100644
index 000000000000..59cb22433b05
--- /dev/null
+++ b/swaggerci/windowsesu/exports/Update-AzWindowsesuMultipleActivationKey.ps1
@@ -0,0 +1,199 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Update a MAK key.
+.Description
+Update a MAK key.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey
+.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
+ [MultipleActivationKeyName ]: The name of the MAK key.
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.windowsesu/update-azwindowsesumultipleactivationkey
+#>
+function Update-AzWindowsesuMultipleActivationKey {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('MultipleActivationKeyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the MAK key.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.Windowsesu.private\Update-AzWindowsesuMultipleActivationKey_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.Windowsesu.private\Update-AzWindowsesuMultipleActivationKey_UpdateViaIdentityExpanded';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/generate-help.ps1 b/swaggerci/windowsesu/generate-help.ps1
new file mode 100644
index 000000000000..a356835d8ff0
--- /dev/null
+++ b/swaggerci/windowsesu/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.Windowsesu.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.Windowsesu.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/Module.cs b/swaggerci/windowsesu/generated/Module.cs
new file mode 100644
index 000000000000..b7b1d439cef5
--- /dev/null
+++ b/swaggerci/windowsesu/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.Windowsesu
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Windowsesu 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.Windowsesu.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.Windowsesu";
+
+ /// 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.Windowsesu";
+
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.Windowsesu();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api10/Resource.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.PowerShell.cs
new file mode 100644
index 000000000000..ba4c161b0a90
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.PowerShell.cs
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial class Resource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Resource(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Resource(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Resource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial interface IResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/Resource.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.TypeConverter.cs
new file mode 100644
index 000000000000..1dee19f77a85
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api10.IResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Resource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Resource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/Resource.cs b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.cs
new file mode 100644
index 000000000000..22e41930a3ef
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ public partial class Resource :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private string _type;
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public Resource()
+ {
+
+ }
+ }
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ public partial interface IResource :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the resource",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ internal partial interface IResourceInternal
+
+ {
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ string Id { get; set; }
+ /// The name of the resource
+ string Name { get; set; }
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/Resource.json.cs b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.json.cs
new file mode 100644
index 000000000000..6c80a9b9996e
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/Resource.json.cs
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ public partial class Resource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new Resource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api10/TrackedResource.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.PowerShell.cs
new file mode 100644
index 000000000000..5f400338e0ee
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.PowerShell.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ ///
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))]
+ public partial class TrackedResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// 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.Windowsesu.Models.Api10.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResource(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResource(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))]
+ public partial interface ITrackedResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.TypeConverter.cs
new file mode 100644
index 000000000000..5d98a8e46f94
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api10.ITrackedResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.cs
new file mode 100644
index 000000000000..0ec5f0d0b295
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ ///
+ public partial class TrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.Resource();
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Id; }
+
+ /// Backing field for property.
+ private string _location;
+
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Location { get => this._location; set => this._location = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTags()); set => this._tag = value; }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public TrackedResource()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ public partial interface ITrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResource
+ {
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The geo-location where the resource lives",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string Location { get; set; }
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags Tag { get; set; }
+
+ }
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ internal partial interface ITrackedResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal
+ {
+ /// The geo-location where the resource lives
+ string Location { get; set; }
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags Tag { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.json.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.json.cs
new file mode 100644
index 000000000000..f3ef31a9bf5c
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResource.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.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
+ ///
+ public partial class TrackedResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new TrackedResource(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.Resource(json);
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;}
+ {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;}
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs
new file mode 100644
index 000000000000..5fb1f31beaf4
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial class TrackedResourceTags
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// 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.Windowsesu.Models.Api10.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResourceTags(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResourceTags(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResourceTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResourceTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial interface ITrackedResourceTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs
new file mode 100644
index 000000000000..09bd6ef4080d
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api10.ITrackedResourceTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.cs
new file mode 100644
index 000000000000..d9c9c10c1a90
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTagsInternal
+ {
+
+ /// Creates an new instance.
+ public TrackedResourceTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface ITrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface ITrackedResourceTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs
new file mode 100644
index 000000000000..e5e014ca4978
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.json.cs b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.json.cs
new file mode 100644
index 000000000000..9014e454c772
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api10/TrackedResourceTags.json.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TrackedResourceTags
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.PowerShell.cs
new file mode 100644
index 000000000000..8d010ca49668
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.PowerShell.cs
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// Error definition.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDefinitionTypeConverter))]
+ public partial class ErrorDefinition
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IErrorDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorDefinition(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.Windowsesu.Models.Api20190916Preview.IErrorDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorDefinition(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorDefinition(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.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorDefinition(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.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.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.Windowsesu.Models.Api20190916Preview.IErrorDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Error definition.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDefinitionTypeConverter))]
+ public partial interface IErrorDefinition
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.TypeConverter.cs
new file mode 100644
index 000000000000..99e1e2b01a3f
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorDefinitionTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IErrorDefinition ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorDefinition.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorDefinition.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/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.cs
new file mode 100644
index 000000000000..8454201e018f
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.cs
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Error definition.
+ public partial class ErrorDefinition :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] _detail;
+
+ /// Internal error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get => this._detail; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal.Detail { get => this._detail; set { {_detail = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Creates an new instance.
+ public ErrorDefinition()
+ {
+
+ }
+ }
+ /// Error definition.
+ public partial interface IErrorDefinition :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Service specific error code which serves as the substatus for the HTTP error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Internal error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Internal error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get; }
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Description of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// Error definition.
+ internal partial interface IErrorDefinitionInternal
+
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ string Code { get; set; }
+ /// Internal error details.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get; set; }
+ /// Description of the error.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.json.cs
new file mode 100644
index 000000000000..6c23276d7bf8
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorDefinition.json.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Error definition.
+ public partial class ErrorDefinition
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorDefinition(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IErrorDefinition) (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinition.FromJson(__u) )) ))() : null : Detail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new ErrorDefinition(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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..b99ecbe425ea
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.PowerShell.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.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.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinitionTypeConverter.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.Windowsesu.Models.Api20190916Preview.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..0078faae01ca
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.cs
new file mode 100644
index 000000000000..6fc44e532c34
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.cs
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Error response.
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal
+ {
+
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Code; }
+
+ /// Internal error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Detail; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition _error;
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinition()); set => this._error = value; }
+
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Code = value; }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Detail = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorDefinition()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinitionInternal)Error).Message = value; }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// Error response.
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Service specific error code which serves as the substatus for the HTTP error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Internal error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Internal error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get; }
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Description of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// Error response.
+ internal partial interface IErrorResponseInternal
+
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ string Code { get; set; }
+ /// Internal error details.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition[] Detail { get; set; }
+ /// The error details.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorDefinition Error { get; set; }
+ /// Description of the error.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/ErrorResponse.json.cs
new file mode 100644
index 000000000000..6578d79eaf32
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.ErrorDefinition.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.PowerShell.cs
new file mode 100644
index 000000000000..2be98b9afc3c
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.PowerShell.cs
@@ -0,0 +1,250 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// MAK key details.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyTypeConverter))]
+ public partial class MultipleActivationKey
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new MultipleActivationKey(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new MultipleActivationKey(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal MultipleActivationKey(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("OSType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType.CreateFrom);
+ }
+ if (content.Contains("SupportType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).SupportType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType?) content.GetValueForProperty("SupportType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).SupportType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType.CreateFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("PropertiesMultipleActivationKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).PropertiesMultipleActivationKey = (string) content.GetValueForProperty("PropertiesMultipleActivationKey",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).PropertiesMultipleActivationKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("ExpirationDate"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("InstalledServerNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).InstalledServerNumber = (int?) content.GetValueForProperty("InstalledServerNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).InstalledServerNumber, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("AgreementNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).AgreementNumber = (string) content.GetValueForProperty("AgreementNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).AgreementNumber, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsEligible"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).IsEligible = (bool?) content.GetValueForProperty("IsEligible",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).IsEligible, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal MultipleActivationKey(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("OSType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType.CreateFrom);
+ }
+ if (content.Contains("SupportType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).SupportType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType?) content.GetValueForProperty("SupportType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).SupportType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType.CreateFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("PropertiesMultipleActivationKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).PropertiesMultipleActivationKey = (string) content.GetValueForProperty("PropertiesMultipleActivationKey",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).PropertiesMultipleActivationKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("ExpirationDate"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("InstalledServerNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).InstalledServerNumber = (int?) content.GetValueForProperty("InstalledServerNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).InstalledServerNumber, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("AgreementNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).AgreementNumber = (string) content.GetValueForProperty("AgreementNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).AgreementNumber, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsEligible"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).IsEligible = (bool?) content.GetValueForProperty("IsEligible",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal)this).IsEligible, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// MAK key details.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyTypeConverter))]
+ public partial interface IMultipleActivationKey
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.TypeConverter.cs
new file mode 100644
index 000000000000..3cb0cf669044
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class MultipleActivationKeyTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return MultipleActivationKey.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return MultipleActivationKey.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return MultipleActivationKey.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.cs
new file mode 100644
index 000000000000..862daf7f7884
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key details.
+ public partial class MultipleActivationKey :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResource();
+
+ /// Agreement number under which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string AgreementNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).AgreementNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).AgreementNumber = value ?? null; }
+
+ /// End of support of security updates activated by the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public global::System.DateTime? ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ExpirationDate; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Id; }
+
+ /// Number of activations/servers using the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public int? InstalledServerNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).InstalledServerNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).InstalledServerNumber = value ?? default(int); }
+
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public bool? IsEligible { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).IsEligible; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).IsEligible = value ?? default(bool); }
+
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value ; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Type = value; }
+
+ /// Internal Acessors for ExpirationDate
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal.ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ExpirationDate = value; }
+
+ /// Internal Acessors for PropertiesMultipleActivationKey
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal.PropertiesMultipleActivationKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).MultipleActivationKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).MultipleActivationKey = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ProvisioningState = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Name; }
+
+ /// Type of OS for which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType)""); }
+
+ /// MAK 5x5 key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string PropertiesMultipleActivationKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).MultipleActivationKey; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties _property;
+
+ /// MAK key specific properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyProperties()); set => this._property = value; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).ProvisioningState; }
+
+ /// Type of support
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).SupportType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)Property).SupportType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType)""); }
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.IResourceInternal)__trackedResource).Type; }
+
+ /// Creates an new instance.
+ public MultipleActivationKey()
+ {
+
+ }
+
+ /// 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.Windowsesu.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource);
+ await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource);
+ }
+ }
+ /// MAK key details.
+ public partial interface IMultipleActivationKey :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResource
+ {
+ /// Agreement number under which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Agreement number under which the key is requested.",
+ SerializedName = @"agreementNumber",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgreementNumber { get; set; }
+ /// End of support of security updates activated by the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"End of support of security updates activated by the MAK key.",
+ SerializedName = @"expirationDate",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ExpirationDate { get; }
+ /// Number of activations/servers using the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Number of activations/servers using the MAK key.",
+ SerializedName = @"installedServerNumber",
+ PossibleTypes = new [] { typeof(int) })]
+ int? InstalledServerNumber { get; set; }
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @" true if user has eligible on-premises Windows physical or virtual machines, and that the requested key will only be used in their organization; false otherwise.",
+ SerializedName = @"isEligible",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsEligible { get; set; }
+ /// Type of OS for which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of OS for which the key is requested.",
+ SerializedName = @"osType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get; set; }
+ /// MAK 5x5 key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"MAK 5x5 key.",
+ SerializedName = @"multipleActivationKey",
+ PossibleTypes = new [] { typeof(string) })]
+ string PropertiesMultipleActivationKey { get; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get; }
+ /// Type of support
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of support",
+ SerializedName = @"supportType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get; set; }
+
+ }
+ /// MAK key details.
+ internal partial interface IMultipleActivationKeyInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.ITrackedResourceInternal
+ {
+ /// Agreement number under which the key is requested.
+ string AgreementNumber { get; set; }
+ /// End of support of security updates activated by the MAK key.
+ global::System.DateTime? ExpirationDate { get; set; }
+ /// Number of activations/servers using the MAK key.
+ int? InstalledServerNumber { get; set; }
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ bool? IsEligible { get; set; }
+ /// Type of OS for which the key is requested.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get; set; }
+ /// MAK 5x5 key.
+ string PropertiesMultipleActivationKey { get; set; }
+ /// MAK key specific properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties Property { get; set; }
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Type of support
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.json.cs
new file mode 100644
index 000000000000..73adafc5c8c5
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKey.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key details.
+ public partial class MultipleActivationKey
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new MultipleActivationKey(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal MultipleActivationKey(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api10.TrackedResource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyProperties.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __trackedResource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.PowerShell.cs
new file mode 100644
index 000000000000..bbe292d75f60
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// List of MAK keys.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyListTypeConverter))]
+ public partial class MultipleActivationKeyList
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new MultipleActivationKeyList(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new MultipleActivationKeyList(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal MultipleActivationKeyList(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)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 MultipleActivationKeyList(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal)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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// List of MAK keys.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyListTypeConverter))]
+ public partial interface IMultipleActivationKeyList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.TypeConverter.cs
new file mode 100644
index 000000000000..d8e5498fdf6d
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class MultipleActivationKeyListTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return MultipleActivationKeyList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyList.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.cs
new file mode 100644
index 000000000000..30229e015def
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// List of MAK keys.
+ public partial class MultipleActivationKeyList :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to the next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[] _value;
+
+ /// List of MAK keys.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public MultipleActivationKeyList()
+ {
+
+ }
+ }
+ /// List of MAK keys.
+ public partial interface IMultipleActivationKeyList :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ /// Link to the next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Link to the next page of resources.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// List of MAK keys.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"List of MAK keys.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[] Value { get; set; }
+
+ }
+ /// List of MAK keys.
+ internal partial interface IMultipleActivationKeyListInternal
+
+ {
+ /// Link to the next page of resources.
+ string NextLink { get; set; }
+ /// List of MAK keys.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.json.cs
new file mode 100644
index 000000000000..b4eecb6cf36b
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyList.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// List of MAK keys.
+ public partial class MultipleActivationKeyList
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new MultipleActivationKeyList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal MultipleActivationKeyList(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey) (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKey.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.PowerShell.cs
new file mode 100644
index 000000000000..310f082d7f9e
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.PowerShell.cs
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// MAK key specific properties.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyPropertiesTypeConverter))]
+ public partial class MultipleActivationKeyProperties
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new MultipleActivationKeyProperties(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new MultipleActivationKeyProperties(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal MultipleActivationKeyProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MultipleActivationKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).MultipleActivationKey = (string) content.GetValueForProperty("MultipleActivationKey",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).MultipleActivationKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("ExpirationDate"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OSType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType.CreateFrom);
+ }
+ if (content.Contains("SupportType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).SupportType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType?) content.GetValueForProperty("SupportType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).SupportType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType.CreateFrom);
+ }
+ if (content.Contains("InstalledServerNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).InstalledServerNumber = (int?) content.GetValueForProperty("InstalledServerNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).InstalledServerNumber, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("AgreementNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).AgreementNumber = (string) content.GetValueForProperty("AgreementNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).AgreementNumber, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsEligible"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).IsEligible = (bool?) content.GetValueForProperty("IsEligible",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).IsEligible, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal MultipleActivationKeyProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("MultipleActivationKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).MultipleActivationKey = (string) content.GetValueForProperty("MultipleActivationKey",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).MultipleActivationKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("ExpirationDate"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("OSType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType.CreateFrom);
+ }
+ if (content.Contains("SupportType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).SupportType = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType?) content.GetValueForProperty("SupportType",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).SupportType, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType.CreateFrom);
+ }
+ if (content.Contains("InstalledServerNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).InstalledServerNumber = (int?) content.GetValueForProperty("InstalledServerNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).InstalledServerNumber, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("AgreementNumber"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).AgreementNumber = (string) content.GetValueForProperty("AgreementNumber",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).AgreementNumber, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsEligible"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).IsEligible = (bool?) content.GetValueForProperty("IsEligible",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).IsEligible, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState.CreateFrom);
+ }
+ 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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// MAK key specific properties.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyPropertiesTypeConverter))]
+ public partial interface IMultipleActivationKeyProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.TypeConverter.cs
new file mode 100644
index 000000000000..53bd6edfecca
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class MultipleActivationKeyPropertiesTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return MultipleActivationKeyProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyProperties.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.cs
new file mode 100644
index 000000000000..08837a794395
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.cs
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key specific properties.
+ public partial class MultipleActivationKeyProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _agreementNumber;
+
+ /// Agreement number under which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string AgreementNumber { get => this._agreementNumber; set => this._agreementNumber = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _expirationDate;
+
+ /// End of support of security updates activated by the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public global::System.DateTime? ExpirationDate { get => this._expirationDate; }
+
+ /// Backing field for property.
+ private int? _installedServerNumber;
+
+ /// Number of activations/servers using the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public int? InstalledServerNumber { get => this._installedServerNumber; set => this._installedServerNumber = value; }
+
+ /// Backing field for property.
+ private bool? _isEligible;
+
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public bool? IsEligible { get => this._isEligible; set => this._isEligible = value; }
+
+ /// Internal Acessors for ExpirationDate
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal.ExpirationDate { get => this._expirationDate; set { {_expirationDate = value;} } }
+
+ /// Internal Acessors for MultipleActivationKey
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal.MultipleActivationKey { get => this._multipleActivationKey; set { {_multipleActivationKey = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Backing field for property.
+ private string _multipleActivationKey;
+
+ /// MAK 5x5 key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string MultipleActivationKey { get => this._multipleActivationKey; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? _oSType;
+
+ /// Type of OS for which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get => this._oSType; set => this._oSType = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? _provisioningState;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? _supportType;
+
+ /// Type of support
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get => this._supportType; set => this._supportType = value; }
+
+ /// Creates an new instance.
+ public MultipleActivationKeyProperties()
+ {
+
+ }
+ }
+ /// MAK key specific properties.
+ public partial interface IMultipleActivationKeyProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ /// Agreement number under which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Agreement number under which the key is requested.",
+ SerializedName = @"agreementNumber",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgreementNumber { get; set; }
+ /// End of support of security updates activated by the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"End of support of security updates activated by the MAK key.",
+ SerializedName = @"expirationDate",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? ExpirationDate { get; }
+ /// Number of activations/servers using the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Number of activations/servers using the MAK key.",
+ SerializedName = @"installedServerNumber",
+ PossibleTypes = new [] { typeof(int) })]
+ int? InstalledServerNumber { get; set; }
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @" true if user has eligible on-premises Windows physical or virtual machines, and that the requested key will only be used in their organization; false otherwise.",
+ SerializedName = @"isEligible",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsEligible { get; set; }
+ /// MAK 5x5 key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"MAK 5x5 key.",
+ SerializedName = @"multipleActivationKey",
+ PossibleTypes = new [] { typeof(string) })]
+ string MultipleActivationKey { get; }
+ /// Type of OS for which the key is requested.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of OS for which the key is requested.",
+ SerializedName = @"osType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get; }
+ /// Type of support
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of support",
+ SerializedName = @"supportType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get; set; }
+
+ }
+ /// MAK key specific properties.
+ internal partial interface IMultipleActivationKeyPropertiesInternal
+
+ {
+ /// Agreement number under which the key is requested.
+ string AgreementNumber { get; set; }
+ /// End of support of security updates activated by the MAK key.
+ global::System.DateTime? ExpirationDate { get; set; }
+ /// Number of activations/servers using the MAK key.
+ int? InstalledServerNumber { get; set; }
+ ///
+ /// true if user has eligible on-premises Windows physical or virtual machines, and that the requested key
+ /// will only be used in their organization; false otherwise.
+ ///
+ bool? IsEligible { get; set; }
+ /// MAK 5x5 key.
+ string MultipleActivationKey { get; set; }
+ /// Type of OS for which the key is requested.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType? OSType { get; set; }
+
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Type of support
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType? SupportType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.json.cs
new file mode 100644
index 000000000000..3f97bdd07c66
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyProperties.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key specific properties.
+ public partial class MultipleActivationKeyProperties
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new MultipleActivationKeyProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal MultipleActivationKeyProperties(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_multipleActivationKey = If( json?.PropertyT("multipleActivationKey"), out var __jsonMultipleActivationKey) ? (string)__jsonMultipleActivationKey : (string)MultipleActivationKey;}
+ {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate;}
+ {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;}
+ {_supportType = If( json?.PropertyT("supportType"), out var __jsonSupportType) ? (string)__jsonSupportType : (string)SupportType;}
+ {_installedServerNumber = If( json?.PropertyT("installedServerNumber"), out var __jsonInstalledServerNumber) ? (int?)__jsonInstalledServerNumber : InstalledServerNumber;}
+ {_agreementNumber = If( json?.PropertyT("agreementNumber"), out var __jsonAgreementNumber) ? (string)__jsonAgreementNumber : (string)AgreementNumber;}
+ {_isEligible = If( json?.PropertyT("isEligible"), out var __jsonIsEligible) ? (bool?)__jsonIsEligible : IsEligible;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ 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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._multipleActivationKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._multipleActivationKey.ToString()) : null, "multipleActivationKey" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._expirationDate ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._expirationDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationDate" ,container.Add );
+ }
+ AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add );
+ AddIf( null != (((object)this._supportType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._supportType.ToString()) : null, "supportType" ,container.Add );
+ AddIf( null != this._installedServerNumber ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNumber((int)this._installedServerNumber) : null, "installedServerNumber" ,container.Add );
+ AddIf( null != (((object)this._agreementNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._agreementNumber.ToString()) : null, "agreementNumber" ,container.Add );
+ AddIf( null != this._isEligible ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonBoolean((bool)this._isEligible) : null, "isEligible" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.PowerShell.cs
new file mode 100644
index 000000000000..d2a43c56dc28
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.PowerShell.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// MAK key details.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyUpdateTypeConverter))]
+ public partial class MultipleActivationKeyUpdate
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new MultipleActivationKeyUpdate(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new MultipleActivationKeyUpdate(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal MultipleActivationKeyUpdate(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTagsTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal MultipleActivationKeyUpdate(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTagsTypeConverter.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// MAK key details.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyUpdateTypeConverter))]
+ public partial interface IMultipleActivationKeyUpdate
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.TypeConverter.cs
new file mode 100644
index 000000000000..ac0b1d9f66e8
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class MultipleActivationKeyUpdateTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return MultipleActivationKeyUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyUpdate.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyUpdate.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.cs
new file mode 100644
index 000000000000..3c527d1e7446
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key details.
+ public partial class MultipleActivationKeyUpdate :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTags()); set => this._tag = value; }
+
+ /// Creates an new instance.
+ public MultipleActivationKeyUpdate()
+ {
+
+ }
+ }
+ /// MAK key details.
+ public partial interface IMultipleActivationKeyUpdate :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags Tag { get; set; }
+
+ }
+ /// MAK key details.
+ internal partial interface IMultipleActivationKeyUpdateInternal
+
+ {
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags Tag { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.json.cs
new file mode 100644
index 000000000000..f16e4cfade58
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdate.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// MAK key details.
+ public partial class MultipleActivationKeyUpdate
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new MultipleActivationKeyUpdate(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal MultipleActivationKeyUpdate(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTags.FromJson(__jsonTags) : Tag;}
+ 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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.PowerShell.cs
new file mode 100644
index 000000000000..37f6a5bacf8a
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.PowerShell.cs
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyUpdateTagsTypeConverter))]
+ public partial class MultipleActivationKeyUpdateTags
+ {
+
+ ///
+ /// 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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new MultipleActivationKeyUpdateTags(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new MultipleActivationKeyUpdateTags(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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal MultipleActivationKeyUpdateTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal MultipleActivationKeyUpdateTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(MultipleActivationKeyUpdateTagsTypeConverter))]
+ public partial interface IMultipleActivationKeyUpdateTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.TypeConverter.cs
new file mode 100644
index 000000000000..a593cd9fd29a
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class MultipleActivationKeyUpdateTagsTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return MultipleActivationKeyUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyUpdateTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return MultipleActivationKeyUpdateTags.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/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.cs
new file mode 100644
index 000000000000..6aebc5884728
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class MultipleActivationKeyUpdateTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTagsInternal
+ {
+
+ /// Creates an new instance.
+ public MultipleActivationKeyUpdateTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface IMultipleActivationKeyUpdateTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface IMultipleActivationKeyUpdateTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.dictionary.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.dictionary.cs
new file mode 100644
index 000000000000..d8ba47f42ea5
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.dictionary.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ public partial class MultipleActivationKeyUpdateTags :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyUpdateTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.json.cs
new file mode 100644
index 000000000000..6864c7b9bc73
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/MultipleActivationKeyUpdateTags.json.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class MultipleActivationKeyUpdateTags
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKeyUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new MultipleActivationKeyUpdateTags(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal MultipleActivationKeyUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ 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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.PowerShell.cs
new file mode 100644
index 000000000000..5e656f85c39b
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.PowerShell.cs
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// REST API operation details.
+ [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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// REST API operation details.
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..2c9cec87879c
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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/windowsesu/generated/api/Models/Api20190916Preview/Operation.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.cs
new file mode 100644
index 000000000000..0afc56c227e3
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.cs
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// REST API operation details.
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay _display;
+
+ /// Meta data about operation used for display in portal.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplay()); set => this._display = value; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Description = value ?? null; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Operation = value ?? null; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Provider = value ?? null; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)Display).Resource = value ?? null; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationDisplay()); set { {_display = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Name of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// REST API operation details.
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+ /// Name of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Name of the operation.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+
+ }
+ /// REST API operation details.
+ internal partial interface IOperationInternal
+
+ {
+ /// Meta data about operation used for display in portal.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay Display { get; set; }
+
+ string DisplayDescription { get; set; }
+
+ string DisplayOperation { get; set; }
+
+ string DisplayProvider { get; set; }
+
+ string DisplayResource { get; set; }
+ /// Name of the operation.
+ string Name { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.json.cs
new file mode 100644
index 000000000000..a06e0be7a930
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/Operation.json.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// REST API operation details.
+ 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..a9b0a45547f6
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.PowerShell.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ /// Meta data about operation used for display in portal.
+ [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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Meta data about operation used for display in portal.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..62db5e19f265
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.cs
new file mode 100644
index 000000000000..a9427c5fb516
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Meta data about operation used for display in portal.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// Meta data about operation used for display in portal.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ /// Meta data about operation used for display in portal.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ string Description { get; set; }
+
+ string Operation { get; set; }
+
+ string Provider { get; set; }
+
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationDisplay.json.cs
new file mode 100644
index 000000000000..7fdad8f8559a
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// Meta data about operation used for display in portal.
+ 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/OperationList.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.PowerShell.cs
new file mode 100644
index 000000000000..f2613157732f
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.PowerShell.cs
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.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/windowsesu/generated/api/Models/Api20190916Preview/OperationList.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.TypeConverter.cs
new file mode 100644
index 000000000000..4a5199851d2a
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/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.Windowsesu.Models.Api20190916Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperationList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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/windowsesu/generated/api/Models/Api20190916Preview/OperationList.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.cs
new file mode 100644
index 000000000000..24786bee6fa5
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ /// List of available REST API operations.
+ public partial class OperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationList,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to the next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation[] _value;
+
+ /// List of operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Runtime.IJsonSerializable
+ {
+ /// Link to the next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Link to the next page of resources.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// List of operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"List of operations.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation[] Value { get; set; }
+
+ }
+ /// List of available REST API operations.
+ internal partial interface IOperationListInternal
+
+ {
+ /// Link to the next page of resources.
+ string NextLink { get; set; }
+ /// List of operations.
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.json.cs b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.json.cs
new file mode 100644
index 000000000000..5bd34e5e92d3
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/Api20190916Preview/OperationList.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.Windowsesu.Models.Api20190916Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new OperationList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.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.Windowsesu.Models.Api20190916Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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/windowsesu/generated/api/Models/WindowsesuIdentity.PowerShell.cs b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.PowerShell.cs
new file mode 100644
index 000000000000..715cd07e051b
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.PowerShell.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(WindowsesuIdentityTypeConverter))]
+ public partial class WindowsesuIdentity
+ {
+
+ ///
+ /// 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.Windowsesu.Models.IWindowsesuIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new WindowsesuIdentity(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.Windowsesu.Models.IWindowsesuIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new WindowsesuIdentity(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.Windowsesu.Models.IWindowsesuIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal WindowsesuIdentity(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.Windowsesu.Models.IWindowsesuIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MultipleActivationKeyName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).MultipleActivationKeyName = (string) content.GetValueForProperty("MultipleActivationKeyName",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).MultipleActivationKeyName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)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 WindowsesuIdentity(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.Windowsesu.Models.IWindowsesuIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceGroupName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ }
+ if (content.Contains("MultipleActivationKeyName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).MultipleActivationKeyName = (string) content.GetValueForProperty("MultipleActivationKeyName",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).MultipleActivationKeyName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal)this).Id, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(WindowsesuIdentityTypeConverter))]
+ public partial interface IWindowsesuIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..a26d5e530bd4
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.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.Windowsesu.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class WindowsesuIdentityTypeConverter : 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.Windowsesu.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Models.IWindowsesuIdentity 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 WindowsesuIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return WindowsesuIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return WindowsesuIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return WindowsesuIdentity.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/windowsesu/generated/api/Models/WindowsesuIdentity.cs b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.cs
new file mode 100644
index 000000000000..14c6fe1deb67
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ public partial class WindowsesuIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _multipleActivationKeyName;
+
+ /// The name of the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string MultipleActivationKeyName { get => this._multipleActivationKeyName; set => this._multipleActivationKeyName = value; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The name of the resource group. The name is case insensitive.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string _subscriptionId;
+
+ /// The ID of the target subscription.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Origin(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.PropertyOrigin.Owned)]
+ public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ /// Creates an new instance.
+ public WindowsesuIdentity()
+ {
+
+ }
+ }
+ public partial interface IWindowsesuIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IJsonSerializable
+ {
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// The name of the MAK key.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the MAK key.",
+ SerializedName = @"multipleActivationKeyName",
+ PossibleTypes = new [] { typeof(string) })]
+ string MultipleActivationKeyName { get; set; }
+ /// The name of the resource group. The name is case insensitive.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the resource group. The name is case insensitive.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceGroupName { get; set; }
+ /// The ID of the target subscription.
+ [Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The ID of the target subscription.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SubscriptionId { get; set; }
+
+ }
+ internal partial interface IWindowsesuIdentityInternal
+
+ {
+ /// Resource identity path
+ string Id { get; set; }
+ /// The name of the MAK key.
+ string MultipleActivationKeyName { get; set; }
+ /// The name of the resource group. The name is case insensitive.
+ string ResourceGroupName { get; set; }
+ /// The ID of the target subscription.
+ string SubscriptionId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.json.cs b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.json.cs
new file mode 100644
index 000000000000..fd88cb8eb517
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Models/WindowsesuIdentity.json.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ public partial class WindowsesuIdentity
+ {
+
+ ///
+ /// 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.Windowsesu.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.Windowsesu.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.Windowsesu.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.Windowsesu.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.IWindowsesuIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json ? new WindowsesuIdentity(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.Windowsesu.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
+ AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add );
+ AddIf( null != (((object)this._multipleActivationKeyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._multipleActivationKeyName.ToString()) : null, "multipleActivationKeyName" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject instance to deserialize from.
+ internal WindowsesuIdentity(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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;}
+ {_multipleActivationKeyName = If( json?.PropertyT("multipleActivationKeyName"), out var __jsonMultipleActivationKeyName) ? (string)__jsonMultipleActivationKeyName : (string)MultipleActivationKeyName;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/OSType.Completer.cs b/swaggerci/windowsesu/generated/api/Support/OSType.Completer.cs
new file mode 100644
index 000000000000..421343acb842
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/OSType.Completer.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ /// Type of OS for which the key is requested.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSTypeTypeConverter))]
+ public partial struct OSType :
+ 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) || "Windows7".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Windows7'", "Windows7", global::System.Management.Automation.CompletionResultType.ParameterValue, "Windows7");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "WindowsServer2008".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'WindowsServer2008'", "WindowsServer2008", global::System.Management.Automation.CompletionResultType.ParameterValue, "WindowsServer2008");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "WindowsServer2008R2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'WindowsServer2008R2'", "WindowsServer2008R2", global::System.Management.Automation.CompletionResultType.ParameterValue, "WindowsServer2008R2");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/OSType.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Support/OSType.TypeConverter.cs
new file mode 100644
index 000000000000..086316c76ad2
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/OSType.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.Windowsesu.Support
+{
+
+ /// Type of OS for which the key is requested.
+ public partial class OSTypeTypeConverter :
+ 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) => OSType.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/windowsesu/generated/api/Support/OSType.cs b/swaggerci/windowsesu/generated/api/Support/OSType.cs
new file mode 100644
index 000000000000..f7962d3f09d4
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/OSType.cs
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ /// Type of OS for which the key is requested.
+ public partial struct OSType :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType Windows7 = @"Windows7";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType WindowsServer2008 = @"WindowsServer2008";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType WindowsServer2008R2 = @"WindowsServer2008R2";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to OSType
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new OSType(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type OSType
+ /// 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.Windowsesu.Support.OSType e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type OSType (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 OSType && Equals((OSType)obj);
+ }
+
+ /// Returns hashCode for enum OSType
+ /// 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 OSType(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for OSType
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to OSType
+ /// the value to convert to an instance of .
+
+ public static implicit operator OSType(string value)
+ {
+ return new OSType(value);
+ }
+
+ /// Implicit operator to convert OSType to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum OSType
+ /// 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.Windowsesu.Support.OSType e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum OSType
+ /// 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.Windowsesu.Support.OSType e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.OSType e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/ProvisioningState.Completer.cs b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.Completer.cs
new file mode 100644
index 000000000000..ec3398151812
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.Completer.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ /// Argument completer implementation for ProvisioningState.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningStateTypeConverter))]
+ public partial struct ProvisioningState :
+ 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) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/ProvisioningState.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.TypeConverter.cs
new file mode 100644
index 000000000000..285a9d9b836d
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.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.Windowsesu.Support
+{
+
+ /// TypeConverter implementation for ProvisioningState.
+ public partial class ProvisioningStateTypeConverter :
+ 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) => ProvisioningState.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/windowsesu/generated/api/Support/ProvisioningState.cs b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.cs
new file mode 100644
index 000000000000..a08df969004d
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/ProvisioningState.cs
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ public partial struct ProvisioningState :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState Accepted = @"Accepted";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState Canceled = @"Canceled";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState Failed = @"Failed";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState Provisioning = @"Provisioning";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState Succeeded = @"Succeeded";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to ProvisioningState
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new ProvisioningState(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type ProvisioningState
+ /// 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.Windowsesu.Support.ProvisioningState e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type ProvisioningState (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 ProvisioningState && Equals((ProvisioningState)obj);
+ }
+
+ /// Returns hashCode for enum ProvisioningState
+ /// 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 ProvisioningState(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for ProvisioningState
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to ProvisioningState
+ /// the value to convert to an instance of .
+
+ public static implicit operator ProvisioningState(string value)
+ {
+ return new ProvisioningState(value);
+ }
+
+ /// Implicit operator to convert ProvisioningState to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum ProvisioningState
+ /// 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.Windowsesu.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum ProvisioningState
+ /// 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.Windowsesu.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.ProvisioningState e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/SupportType.Completer.cs b/swaggerci/windowsesu/generated/api/Support/SupportType.Completer.cs
new file mode 100644
index 000000000000..7faf2e2b411d
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/SupportType.Completer.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ /// Type of support
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportTypeTypeConverter))]
+ public partial struct SupportType :
+ 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) || "SupplementalServicing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'SupplementalServicing'", "SupplementalServicing", global::System.Management.Automation.CompletionResultType.ParameterValue, "SupplementalServicing");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "PremiumAssurance".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("'PremiumAssurance'", "PremiumAssurance", global::System.Management.Automation.CompletionResultType.ParameterValue, "PremiumAssurance");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Support/SupportType.TypeConverter.cs b/swaggerci/windowsesu/generated/api/Support/SupportType.TypeConverter.cs
new file mode 100644
index 000000000000..bc0177783857
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/SupportType.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.Windowsesu.Support
+{
+
+ /// Type of support
+ public partial class SupportTypeTypeConverter :
+ 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) => SupportType.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/windowsesu/generated/api/Support/SupportType.cs b/swaggerci/windowsesu/generated/api/Support/SupportType.cs
new file mode 100644
index 000000000000..2c28b75e7bc7
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Support/SupportType.cs
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support
+{
+
+ /// Type of support
+ public partial struct SupportType :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType PremiumAssurance = @"PremiumAssurance";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType SupplementalServicing = @"SupplementalServicing";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to SupportType
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new SupportType(global::System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type SupportType
+ /// 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.Windowsesu.Support.SupportType e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type SupportType (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 SupportType && Equals((SupportType)obj);
+ }
+
+ /// Returns hashCode for enum SupportType
+ /// 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 SupportType(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for SupportType
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to SupportType
+ /// the value to convert to an instance of .
+
+ public static implicit operator SupportType(string value)
+ {
+ return new SupportType(value);
+ }
+
+ /// Implicit operator to convert SupportType to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum SupportType
+ /// 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.Windowsesu.Support.SupportType e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum SupportType
+ /// 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.Windowsesu.Support.SupportType e1, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Support.SupportType e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/swaggerci/windowsesu/generated/api/Windowsesu.cs b/swaggerci/windowsesu/generated/api/Windowsesu.cs
new file mode 100644
index 000000000000..2f7bffbac49c
--- /dev/null
+++ b/swaggerci/windowsesu/generated/api/Windowsesu.cs
@@ -0,0 +1,1290 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.Windowsesu
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the windowsesu service.
+ /// Manage Multi-Access Keys (MAK) that enable Windows Extended Security Updates (ESU).
+ ///
+ public partial class Windowsesu
+ {
+
+ /// Create a MAK key.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// Details of the MAK key.
+ /// 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.Windowsesu.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 MultipleActivationKeysCreate(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/"
+ + global::System.Uri.EscapeDataString(multipleActivationKeyName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysCreate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Create a MAK key.
+ ///
+ /// Details of the MAK key.
+ /// 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.Windowsesu.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 MultipleActivationKeysCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsESU/multipleActivationKeys/{multipleActivationKeyName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var multipleActivationKeyName = _match.Groups["multipleActivationKeyName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.WindowsESU/multipleActivationKeys/"
+ + multipleActivationKeyName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysCreate_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.Windowsesu.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 MultipleActivationKeysCreate_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.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: default
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // start the delay timer (we'll await later...)
+ var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+ await waiting;
+
+ // check for cancellation
+ if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ if (!string.IsNullOrWhiteSpace(_originalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKey.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// Details of the MAK key.
+ /// 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 MultipleActivationKeysCreate_Validate(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.IMultipleActivationKey body, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(multipleActivationKeyName),multipleActivationKeyName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Delete a MAK key.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// 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.Windowsesu.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 MultipleActivationKeysDelete(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/"
+ + global::System.Uri.EscapeDataString(multipleActivationKeyName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Delete a MAK key.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// 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.Windowsesu.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 MultipleActivationKeysDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsESU/multipleActivationKeys/{multipleActivationKeyName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var multipleActivationKeyName = _match.Groups["multipleActivationKeyName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.WindowsESU/multipleActivationKeys/"
+ + multipleActivationKeyName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysDelete_Call(request,onOk,onNoContent,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 204 (NoContent).
+ /// 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.Windowsesu.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 MultipleActivationKeysDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// 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 MultipleActivationKeysDelete_Validate(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(multipleActivationKeyName),multipleActivationKeyName);
+ }
+ }
+
+ /// Get a MAK key.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// 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.Windowsesu.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 MultipleActivationKeysGet(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/"
+ + global::System.Uri.EscapeDataString(multipleActivationKeyName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get a MAK key.
+ ///
+ /// 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.Windowsesu.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 MultipleActivationKeysGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsESU/multipleActivationKeys/{multipleActivationKeyName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var multipleActivationKeyName = _match.Groups["multipleActivationKeyName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.WindowsESU/multipleActivationKeys/"
+ + multipleActivationKeyName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysGet_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.Windowsesu.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 MultipleActivationKeysGet_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.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKey.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get
+ /// validation events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the MAK key.
+ /// 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 MultipleActivationKeysGet_Validate(string subscriptionId, string resourceGroupName, string multipleActivationKeyName, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(multipleActivationKeyName),multipleActivationKeyName);
+ }
+ }
+
+ /// List all Multiple Activation Keys (MAK) created for a subscription.
+ /// The ID of the target subscription.
+ /// 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.Windowsesu.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 MultipleActivationKeysList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.WindowsESU/multipleActivationKeys"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// List all Multiple Activation Keys (MAK) in a resource group.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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 MultipleActivationKeysListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// List all Multiple Activation Keys (MAK) in a resource group.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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 MultipleActivationKeysListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2019-09-16-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/Microsoft.WindowsESU/multipleActivationKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsESU/multipleActivationKeys'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.WindowsESU/multipleActivationKeys"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.MultipleActivationKeysListByResourceGroup_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.Windowsesu.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 MultipleActivationKeysListByResourceGroup_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.Windowsesu.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.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.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.MultipleActivationKeyList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Models.Api20190916Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Windowsesu.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///