diff --git a/src/SelfHelp/Az.SelfHelp.csproj b/src/SelfHelp/Az.SelfHelp.csproj
new file mode 100644
index 000000000000..ee7e232f4e8b
--- /dev/null
+++ b/src/SelfHelp/Az.SelfHelp.csproj
@@ -0,0 +1,8 @@
+
+
+ SelfHelp
+
+
+
+
+
diff --git a/src/SelfHelp/Az.SelfHelp.format.ps1xml b/src/SelfHelp/Az.SelfHelp.format.ps1xml
new file mode 100644
index 000000000000..23a95d06909d
--- /dev/null
+++ b/src/SelfHelp/Az.SelfHelp.format.ps1xml
@@ -0,0 +1,725 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DiagnosticsResourceName
+
+
+ Scope
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.CheckNameAvailabilityRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.CheckNameAvailabilityRequest
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ActionType
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ProxyResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ProxyResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.CheckNameAvailabilityResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.CheckNameAvailabilityResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Message
+
+
+ NameAvailable
+
+
+ Reason
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Diagnostic
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Diagnostic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SolutionId
+
+
+ Status
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocation
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocation
+
+
+
+
+
+
+
+
+
+
+
+ SolutionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParameters
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParameters
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AcceptedAt
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParameters
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParameters
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiscoveryResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiscoveryResponse
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Error
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Insight
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Insight
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ImportanceLevel
+
+
+ Result
+
+
+ Title
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ RequiredParameterSet
+
+
+ SolutionId
+
+
+ SolutionType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/SelfHelp/Az.SelfHelp.psd1 b/src/SelfHelp/Az.SelfHelp.psd1
new file mode 100644
index 000000000000..163380916fc1
--- /dev/null
+++ b/src/SelfHelp/Az.SelfHelp.psd1
@@ -0,0 +1,134 @@
+#
+# Module manifest for module 'Az.SelfHelp'
+#
+# Generated by: Microsoft Corporation
+#
+# Generated on: 6/7/2023
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+RootModule = './Az.SelfHelp.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1.0'
+
+# Supported PSEditions
+CompatiblePSEditions = 'Core', 'Desktop'
+
+# ID used to uniquely identify this module
+GUID = '2705ffd2-39d8-491f-b0c6-14fca2dc3727'
+
+# Author of this module
+Author = 'Microsoft Corporation'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = 'Microsoft Corporation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'Microsoft Azure PowerShell: SelfHelp cmdlets'
+
+# Minimum version of the PowerShell engine required by this module
+PowerShellVersion = '5.1'
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+DotNetFrameworkVersion = '4.7.2'
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# ClrVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.12.3'; })
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = './bin/Az.SelfHelp.private.dll'
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+# ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = './Az.SelfHelp.format.ps1xml'
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+# NestedModules = @()
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = 'Get-AzSelfHelpDiagnostic', 'Get-AzSelfHelpDiscoverySolution',
+ 'New-AzSelfHelpDiagnostic',
+ 'Test-AzSelfHelpDiagnosticNameAvailability'
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+# VariablesToExport = @()
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = '*'
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = 'Azure','ResourceManager','ARM','PSModule','SelfHelp'
+
+ # A URL to the license for this module.
+ LicenseUri = 'https://aka.ms/azps-license'
+
+ # A URL to the main website for this project.
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ # Prerelease string of this module
+ # Prerelease = ''
+
+ # Flag to indicate whether the module requires explicit user acceptance for install/update/save
+ # RequireLicenseAcceptance = $false
+
+ # External dependent modules of this module
+ # ExternalModuleDependencies = @()
+
+ } # End of PSData hashtable
+
+ } # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/src/SelfHelp/Az.SelfHelp.psm1 b/src/SelfHelp/Az.SelfHelp.psm1
new file mode 100644
index 000000000000..7dca99691941
--- /dev/null
+++ b/src/SelfHelp/Az.SelfHelp.psm1
@@ -0,0 +1,115 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.SelfHelp.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/SelfHelp/ChangeLog.md b/src/SelfHelp/ChangeLog.md
new file mode 100644
index 000000000000..c403d7a73ea3
--- /dev/null
+++ b/src/SelfHelp/ChangeLog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* First preview release for module Az.SelfHelp
+
diff --git a/src/SelfHelp/Properties/AssemblyInfo.cs b/src/SelfHelp/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..faec0220f2e7
--- /dev/null
+++ b/src/SelfHelp/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - SelfHelp")]
+[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
+[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
+[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: Guid("eec65845-b687-45bc-bdd2-6022dab00112")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
diff --git a/src/SelfHelp/README.md b/src/SelfHelp/README.md
new file mode 100644
index 000000000000..324dd60633d8
--- /dev/null
+++ b/src/SelfHelp/README.md
@@ -0,0 +1,69 @@
+
+# Az.SelfHelp
+This directory contains the PowerShell module for the SelfHelp service.
+
+---
+## Status
+[![Az.SelfHelp](https://img.shields.io/powershellgallery/v/Az.SelfHelp.svg?style=flat-square&label=Az.SelfHelp "Az.SelfHelp")](https://www.powershellgallery.com/packages/Az.SelfHelp/)
+
+## 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.SelfHelp`, see [how-to.md](how-to.md).
+
+
+### AutoRest Configuration
+
+> see https://aka.ms/autorest
+
+```yaml
+# pin the swagger version by using the commit id instead of branch name
+branch: c2c2f7a359c217380a5ae047e153bac36c404a0c
+require:
+ # readme.azure.noprofile.md is the common configuration file
+ - $(this-folder)/../readme.azure.noprofile.md
+ - $(repo)/specification/help/resource-manager/readme.md
+ # If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
+ # - $(this-folder)/azure-rest-api-specs/specification/help/resource-manager/readme.md
+
+try-require:
+ - $(repo)/specification/help/resource-manager/readme.powershell.md
+
+# For new RP, the version is 0.1.0
+module-version: 0.1.0
+# Normally, title is the service name
+title: SelfHelp
+subject-prefix: $(service-name)
+
+# If there are post APIs for some kinds of actions in the RP, you may need to
+# uncomment following line to support viaIdentity for these post APIs
+# identity-correction-for-post: true
+resourcegroup-append: true
+nested-object-to-string: true
+
+directive:
+ # Following is two common directive which are normally required in all the RPs
+ # 1. Remove the unexpanded parameter set
+ # 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
+ - where:
+ variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
+ remove: true
+ # Remove the set-* cmdlet
+ - where:
+ verb: Set
+ remove: true
+```
diff --git a/src/SelfHelp/SelfHelp.sln b/src/SelfHelp/SelfHelp.sln
new file mode 100644
index 000000000000..3f90ff4f85f2
--- /dev/null
+++ b/src/SelfHelp/SelfHelp.sln
@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{1FC15EA0-9570-47B3-BD7D-49E5BF80F83B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{B6442FF5-262E-4517-83C9-A4515AE29086}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{8674F85D-3F1C-4986-AEBB-AE7C6F44834F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{B3A1B916-DA11-40C4-8DDE-5528E2BB3F7D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{1AF4D983-3F55-4F90-B852-84ADB885BB9F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{4645C431-8487-4CEC-BE3D-E650052547A0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.SelfHelp", "Az.SelfHelp.csproj", "{D5B2802D-C49F-4807-9480-69AEE6297A5B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1FC15EA0-9570-47B3-BD7D-49E5BF80F83B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FC15EA0-9570-47B3-BD7D-49E5BF80F83B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FC15EA0-9570-47B3-BD7D-49E5BF80F83B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FC15EA0-9570-47B3-BD7D-49E5BF80F83B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6442FF5-262E-4517-83C9-A4515AE29086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6442FF5-262E-4517-83C9-A4515AE29086}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6442FF5-262E-4517-83C9-A4515AE29086}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6442FF5-262E-4517-83C9-A4515AE29086}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8674F85D-3F1C-4986-AEBB-AE7C6F44834F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8674F85D-3F1C-4986-AEBB-AE7C6F44834F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8674F85D-3F1C-4986-AEBB-AE7C6F44834F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8674F85D-3F1C-4986-AEBB-AE7C6F44834F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B3A1B916-DA11-40C4-8DDE-5528E2BB3F7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B3A1B916-DA11-40C4-8DDE-5528E2BB3F7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B3A1B916-DA11-40C4-8DDE-5528E2BB3F7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B3A1B916-DA11-40C4-8DDE-5528E2BB3F7D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1AF4D983-3F55-4F90-B852-84ADB885BB9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1AF4D983-3F55-4F90-B852-84ADB885BB9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1AF4D983-3F55-4F90-B852-84ADB885BB9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1AF4D983-3F55-4F90-B852-84ADB885BB9F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4645C431-8487-4CEC-BE3D-E650052547A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4645C431-8487-4CEC-BE3D-E650052547A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4645C431-8487-4CEC-BE3D-E650052547A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4645C431-8487-4CEC-BE3D-E650052547A0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D5B2802D-C49F-4807-9480-69AEE6297A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D5B2802D-C49F-4807-9480-69AEE6297A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D5B2802D-C49F-4807-9480-69AEE6297A5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D5B2802D-C49F-4807-9480-69AEE6297A5B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/src/SelfHelp/build-module.ps1 b/src/SelfHelp/build-module.ps1
new file mode 100644
index 000000000000..67170785a73b
--- /dev/null
+++ b/src/SelfHelp/build-module.ps1
@@ -0,0 +1,165 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$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.SelfHelp.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.SelfHelp.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.SelfHelp.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.SelfHelp'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @()
+$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
+if (Test-Path $modelCmdletFolder) {
+ $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
+}
+if ($modelCmdlets.Count -gt 0) {
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
+ CreateModelCmdlet($modelCmdlets)
+}
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: SelfHelp 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.SelfHelp.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/src/SelfHelp/check-dependencies.ps1 b/src/SelfHelp/check-dependencies.ps1
new file mode 100644
index 000000000000..c29591c7bfe1
--- /dev/null
+++ b/src/SelfHelp/check-dependencies.ps1
@@ -0,0 +1,65 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$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/src/SelfHelp/create-model-cmdlets.ps1 b/src/SelfHelp/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..d179d0d009ba
--- /dev/null
+++ b/src/SelfHelp/create-model-cmdlets.ps1
@@ -0,0 +1,183 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+function CreateModelCmdlet {
+
+ param([string[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+ if (''.length -gt 0) {
+ $ModuleName = ''
+ } else {
+ $ModuleName = 'Az.SelfHelp'
+ }
+
+ $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('SelfHelp')) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = 'SelfHelp'
+ }
+ $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 Apache License, Version 2.0 (the ""License"");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an ""AS IS"" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for ${ObjectType}.
+.Description
+Create an in-memory object for ${ObjectType}.
+
+.Outputs
+${ObjectTypeWithNamespace}
+.Link
+https://learn.microsoft.com/powershell/module/${ModuleName}/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/src/SelfHelp/custom/Az.SelfHelp.custom.psm1 b/src/SelfHelp/custom/Az.SelfHelp.custom.psm1
new file mode 100644
index 000000000000..08cd64979dc8
--- /dev/null
+++ b/src/SelfHelp/custom/Az.SelfHelp.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.SelfHelp.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.SelfHelp.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/SelfHelp/custom/README.md b/src/SelfHelp/custom/README.md
new file mode 100644
index 000000000000..f1e81b8f7525
--- /dev/null
+++ b/src/SelfHelp/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.SelfHelp` 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.SelfHelp.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.SelfHelp` 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.SelfHelp.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.SelfHelp.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.SelfHelp`. 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.SelfHelp.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.SelfHelp`.
+- `Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.SelfHelp`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/SelfHelp/examples/Get-AzSelfHelpDiagnostic.md b/src/SelfHelp/examples/Get-AzSelfHelpDiagnostic.md
new file mode 100644
index 000000000000..fdeccbfaf234
--- /dev/null
+++ b/src/SelfHelp/examples/Get-AzSelfHelpDiagnostic.md
@@ -0,0 +1,13 @@
+### Example 1: Get diagnostic by resource id and diagnostic name
+
+```powershell
+ Get-AzSelfHelpDiagnostic -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -SResourceName ab-test-983
+```
+
+```output
+Name
+----
+ab-test-983
+```
+
+Get diagnostic by resource id and diagnostic name
diff --git a/src/SelfHelp/examples/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/examples/Get-AzSelfHelpDiscoverySolution.md
new file mode 100644
index 000000000000..941737e75bd0
--- /dev/null
+++ b/src/SelfHelp/examples/Get-AzSelfHelpDiscoverySolution.md
@@ -0,0 +1,13 @@
+### Example 1: Get Solution Metadata by resource id
+
+```powershell
+ Get-AzSelfHelpDiscoverySolution -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault"
+```
+
+```output
+Name
+----
+KeyVaultUnauthorizedNetworkInsight
+```
+
+Get Solution Metadata by resource id
diff --git a/src/SelfHelp/examples/New-AzSelfHelpDiagnostic.md b/src/SelfHelp/examples/New-AzSelfHelpDiagnostic.md
new file mode 100644
index 000000000000..7dda99109062
--- /dev/null
+++ b/src/SelfHelp/examples/New-AzSelfHelpDiagnostic.md
@@ -0,0 +1,16 @@
+### Example 1: Create Diagnostic for a KeyVault resource.
+
+```powershell
+$insightsToInvoke = [ordered]@{
+ "solutionId" = "Demo2InsightV2"
+ }
+New-AzSelfHelpDiagnostic -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aravind-test-resources/providers/Microsoft.KeyVault/vaults/ab-tests-kv-an" -SResourceName ab-test-973 -Insight $insightsToInvoke
+```
+
+```output
+Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
+---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- -----------------
+ab-test-973 aravind-test-reso…
+```
+
+Creates a diagnostic for a KeyVault resource.
diff --git a/src/SelfHelp/examples/Test-AzSelfHelpDiagnosticNameAvailability.md b/src/SelfHelp/examples/Test-AzSelfHelpDiagnosticNameAvailability.md
new file mode 100644
index 000000000000..0711c02fa66c
--- /dev/null
+++ b/src/SelfHelp/examples/Test-AzSelfHelpDiagnosticNameAvailability.md
@@ -0,0 +1,28 @@
+### Example 1: Example when the diagnostic resource name is available
+
+```powershell
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+```
+
+```output
+Message NameAvailable Reason
+------- ------------- ------
+ True
+
+```
+
+Example when the diagnostic resource name is available
+
+### Example 2: Example when the diagnostic resource name is available
+
+```powershell
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+```
+
+```output
+Message NameAvailable Reason
+------- ------------- ------
+Resource name is currently in use. False Resource name already exisits/unavailable
+```
+
+Example when the diagnostic resource name is not available
diff --git a/src/SelfHelp/export-surface.ps1 b/src/SelfHelp/export-surface.ps1
new file mode 100644
index 000000000000..33b444d91309
--- /dev/null
+++ b/src/SelfHelp/export-surface.ps1
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$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.SelfHelp.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.SelfHelp'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/SelfHelp/exports/Get-AzSelfHelpDiagnostic.ps1 b/src/SelfHelp/exports/Get-AzSelfHelpDiagnostic.ps1
new file mode 100644
index 000000000000..a935a8e6843c
--- /dev/null
+++ b/src/SelfHelp/exports/Get-AzSelfHelpDiagnostic.ps1
@@ -0,0 +1,187 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+.Description
+Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+.Example
+ Get-AzSelfHelpDiagnostic -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -SResourceName ab-test-983
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource
+.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
+ [DiagnosticsResourceName ]: Unique resource name for insight resources
+ [Id ]: Resource identity path
+ [Scope ]: This is an extension resource provider and only resource level extension is supported at the moment.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic
+#>
+function Get-AzSelfHelpDiagnostic {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('DiagnosticsResourceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # Unique resource name for insight resources
+ ${SResourceName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity]
+ # 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.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.private\Get-AzSelfHelpDiagnostic_Get';
+ GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpDiagnostic_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/SelfHelp/exports/Get-AzSelfHelpDiscoverySolution.ps1 b/src/SelfHelp/exports/Get-AzSelfHelpDiscoverySolution.ps1
new file mode 100644
index 000000000000..1d2ed8557a46
--- /dev/null
+++ b/src/SelfHelp/exports/Get-AzSelfHelpDiscoverySolution.ps1
@@ -0,0 +1,176 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API.
+.Description
+Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API.
+.Example
+ Get-AzSelfHelpDiscoverySolution -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution
+#>
+function Get-AzSelfHelpDiscoverySolution {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Query')]
+ [System.String]
+ # Can be used to filter solutionIds by 'ProblemClassificationId'.
+ # The filter supports only 'and' and 'eq' operators.
+ # Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Query')]
+ [System.String]
+ # Skiptoken is only used if a previous operation returned a partial result.
+ # If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
+ ${Skiptoken},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 = @{
+ List = 'Az.SelfHelp.private\Get-AzSelfHelpDiscoverySolution_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/SelfHelp/exports/New-AzSelfHelpDiagnostic.ps1 b/src/SelfHelp/exports/New-AzSelfHelpDiagnostic.ps1
new file mode 100644
index 000000000000..d2b13e00e113
--- /dev/null
+++ b/src/SelfHelp/exports/New-AzSelfHelpDiagnostic.ps1
@@ -0,0 +1,209 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Diagnostics tells you precisely the root cause of the issue and how to address it.
+You can get diagnostics once you discover and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+.Description
+Diagnostics tells you precisely the root cause of the issue and how to address it.
+You can get diagnostics once you discover and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+.Example
+$insightsToInvoke = [ordered]@{
+ "solutionId" = "Demo2InsightV2"
+ }
+New-AzSelfHelpDiagnostic -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aravind-test-resources/providers/Microsoft.KeyVault/vaults/ab-tests-kv-an" -SResourceName ab-test-973 -Insight $insightsToInvoke
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource
+.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.
+
+INSIGHT : SolutionIds that are needed to be invoked.
+ [AdditionalParameter ]: Additional parameters required to invoke the solutionId.
+ [(Any) ]: This indicates any property can be added to this object.
+ [SolutionId ]: Solution Id to invoke.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic
+#>
+function New-AzSelfHelpDiagnostic {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('DiagnosticsResourceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # Unique resource name for insight resources
+ ${SResourceName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters]))]
+ [System.Collections.Hashtable]
+ # Global parameters that can be passed to all solutionIds.
+ ${GlobalParameter},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]]
+ # SolutionIds that are needed to be invoked.
+ # To construct, see NOTES section for INSIGHT properties and create a hash table.
+ ${Insight},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/SelfHelp/exports/ProxyCmdletDefinitions.ps1 b/src/SelfHelp/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..4095b0c2e128
--- /dev/null
+++ b/src/SelfHelp/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,741 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+.Description
+Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+.Example
+ Get-AzSelfHelpDiagnostic -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -SResourceName ab-test-983
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource
+.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
+ [DiagnosticsResourceName ]: Unique resource name for insight resources
+ [Id ]: Resource identity path
+ [Scope ]: This is an extension resource provider and only resource level extension is supported at the moment.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic
+#>
+function Get-AzSelfHelpDiagnostic {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('DiagnosticsResourceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # Unique resource name for insight resources
+ ${SResourceName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity]
+ # 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.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.private\Get-AzSelfHelpDiagnostic_Get';
+ GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpDiagnostic_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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
+Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API.
+.Description
+Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API.
+.Example
+ Get-AzSelfHelpDiscoverySolution -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution
+#>
+function Get-AzSelfHelpDiscoverySolution {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Query')]
+ [System.String]
+ # Can be used to filter solutionIds by 'ProblemClassificationId'.
+ # The filter supports only 'and' and 'eq' operators.
+ # Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Query')]
+ [System.String]
+ # Skiptoken is only used if a previous operation returned a partial result.
+ # If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
+ ${Skiptoken},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 = @{
+ List = 'Az.SelfHelp.private\Get-AzSelfHelpDiscoverySolution_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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
+Diagnostics tells you precisely the root cause of the issue and how to address it.
+You can get diagnostics once you discover and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+.Description
+Diagnostics tells you precisely the root cause of the issue and how to address it.
+You can get diagnostics once you discover and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+.Example
+$insightsToInvoke = [ordered]@{
+ "solutionId" = "Demo2InsightV2"
+ }
+New-AzSelfHelpDiagnostic -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aravind-test-resources/providers/Microsoft.KeyVault/vaults/ab-tests-kv-an" -SResourceName ab-test-973 -Insight $insightsToInvoke
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource
+.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.
+
+INSIGHT : SolutionIds that are needed to be invoked.
+ [AdditionalParameter ]: Additional parameters required to invoke the solutionId.
+ [(Any) ]: This indicates any property can be added to this object.
+ [SolutionId ]: Solution Id to invoke.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic
+#>
+function New-AzSelfHelpDiagnostic {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('DiagnosticsResourceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # Unique resource name for insight resources
+ ${SResourceName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters]))]
+ [System.Collections.Hashtable]
+ # Global parameters that can be passed to all solutionIds.
+ ${GlobalParameter},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]]
+ # SolutionIds that are needed to be invoked.
+ # To construct, see NOTES section for INSIGHT properties and create a hash table.
+ ${Insight},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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
+This API is used to check the uniqueness of a resource name used for a diagnostic check.
+.Description
+This API is used to check the uniqueness of a resource name used for a diagnostic check.
+.Example
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+.Example
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse
+.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.
+
+CHECKNAMEAVAILABILITYREQUEST : The check availability request body.
+ [Name ]: The name of the resource for which availability needs to be checked.
+ [Type ]: The resource type.
+
+INPUTOBJECT : Identity Parameter
+ [DiagnosticsResourceName ]: Unique resource name for insight resources
+ [Id ]: Resource identity path
+ [Scope ]: This is an extension resource provider and only resource level extension is supported at the moment.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/test-azselfhelpdiagnosticnameavailability
+#>
+function Test-AzSelfHelpDiagnosticNameAvailability {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse])]
+[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Check', Mandatory)]
+ [Parameter(ParameterSetName='CheckExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest]
+ # The check availability request body.
+ # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table.
+ ${CheckNameAvailabilityRequest},
+
+ [Parameter(ParameterSetName='CheckExpanded')]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [System.String]
+ # The name of the resource for which availability needs to be checked.
+ ${Name},
+
+ [Parameter(ParameterSetName='CheckExpanded')]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [System.String]
+ # The resource type.
+ ${Type},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 = @{
+ Check = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_Check';
+ CheckExpanded = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckExpanded';
+ CheckViaIdentity = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckViaIdentity';
+ CheckViaIdentityExpanded = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckViaIdentityExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/SelfHelp/exports/README.md b/src/SelfHelp/exports/README.md
new file mode 100644
index 000000000000..7b9426c0eec3
--- /dev/null
+++ b/src/SelfHelp/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.SelfHelp`. No other cmdlets in this repository are directly exported. What that means is the `Az.SelfHelp` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation.
+
+## Info
+- Modifiable: no
+- Generated: all
+- Committed: no
+- Packaged: yes
+
+## Details
+The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.SelfHelp.private.dll`) and from the `..\custom\Az.SelfHelp.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.SelfHelp.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message.
\ No newline at end of file
diff --git a/src/SelfHelp/exports/Test-AzSelfHelpDiagnosticNameAvailability.ps1 b/src/SelfHelp/exports/Test-AzSelfHelpDiagnosticNameAvailability.ps1
new file mode 100644
index 000000000000..933a3e0f158a
--- /dev/null
+++ b/src/SelfHelp/exports/Test-AzSelfHelpDiagnosticNameAvailability.ps1
@@ -0,0 +1,214 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+This API is used to check the uniqueness of a resource name used for a diagnostic check.
+.Description
+This API is used to check the uniqueness of a resource name used for a diagnostic check.
+.Example
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+.Example
+Test-AzSelfHelpDiagnosticNameAvailability -Name test-diagnostics-resource -Type microsoft.help/diagnostics -Scope "subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba"
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse
+.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.
+
+CHECKNAMEAVAILABILITYREQUEST : The check availability request body.
+ [Name ]: The name of the resource for which availability needs to be checked.
+ [Type ]: The resource type.
+
+INPUTOBJECT : Identity Parameter
+ [DiagnosticsResourceName ]: Unique resource name for insight resources
+ [Id ]: Resource identity path
+ [Scope ]: This is an extension resource provider and only resource level extension is supported at the moment.
+.Link
+https://learn.microsoft.com/powershell/module/az.selfhelp/test-azselfhelpdiagnosticnameavailability
+#>
+function Test-AzSelfHelpDiagnosticNameAvailability {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse])]
+[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Check', Mandatory)]
+ [Parameter(ParameterSetName='CheckExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [System.String]
+ # This is an extension resource provider and only resource level extension is supported at the moment.
+ ${Scope},
+
+ [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest]
+ # The check availability request body.
+ # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table.
+ ${CheckNameAvailabilityRequest},
+
+ [Parameter(ParameterSetName='CheckExpanded')]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [System.String]
+ # The name of the resource for which availability needs to be checked.
+ ${Name},
+
+ [Parameter(ParameterSetName='CheckExpanded')]
+ [Parameter(ParameterSetName='CheckViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')]
+ [System.String]
+ # The resource type.
+ ${Type},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 = @{
+ Check = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_Check';
+ CheckExpanded = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckExpanded';
+ CheckViaIdentity = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckViaIdentity';
+ CheckViaIdentityExpanded = 'Az.SelfHelp.private\Test-AzSelfHelpDiagnosticNameAvailability_CheckViaIdentityExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/SelfHelp/generate-help.ps1 b/src/SelfHelp/generate-help.ps1
new file mode 100644
index 000000000000..a4e23fcd9ba9
--- /dev/null
+++ b/src/SelfHelp/generate-help.ps1
@@ -0,0 +1,74 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$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.SelfHelp.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.SelfHelp.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/src/SelfHelp/generate-info.json b/src/SelfHelp/generate-info.json
new file mode 100644
index 000000000000..605737c59b41
--- /dev/null
+++ b/src/SelfHelp/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "swagger_commit": "6c6b16dc98d720304633b76c8e82c282ffa9cc08",
+ "node": "v14.15.5",
+ "autorest": "`-- (empty)",
+ "autorest_core": "3.9.6",
+ "autorest_modelerfour": "4.15.414",
+ "autorest_powershell": "3.0.504"
+}
diff --git a/src/SelfHelp/generated/Module.cs b/src/SelfHelp/generated/Module.cs
new file mode 100644
index 000000000000..1acc10ffd863
--- /dev/null
+++ b/src/SelfHelp/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.SelfHelp
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp 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.SelfHelp.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.SelfHelp";
+
+ /// 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.SelfHelp";
+
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.SelfHelp();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler)));
+ }
+
+ /// The HTTP Proxy to use.
+ /// The HTTP Proxy Credentials
+ /// True if the proxy should use default credentials
+ public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials)
+ {
+ _useProxy = proxy != null;
+ if (proxy == null)
+ {
+ return;
+ }
+ // set the proxy configuration
+ _webProxy.Address = proxy;
+ _webProxy.BypassProxyOnLocal = false;
+ if (proxyUseDefaultCredentials)
+ {
+ _webProxy.Credentials = null;
+ _webProxy.UseDefaultCredentials = true;
+ }
+ else
+ {
+ _webProxy.UseDefaultCredentials = false;
+ _webProxy.Credentials = proxyCredential ?.GetNetworkCredential();
+ }
+ }
+
+ /// Called to dispatch events to the common module listener
+ /// The ID of the event
+ /// The cancellation token for the event
+ /// A delegate to get the detailed event data
+ /// The callback for the event dispatcher
+ /// The from the cmdlet
+ /// the cmdlet's parameterset name.
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the exception that is being thrown (if available)
+ ///
+ /// A that will be complete when handling of the event is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception)
+ {
+ using( NoSynchronizationContext )
+ {
+ await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Any.PowerShell.cs b/src/SelfHelp/generated/api/Models/Any.PowerShell.cs
new file mode 100644
index 000000000000..49fcf1357396
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Any.PowerShell.cs
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial class Any
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Any(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Any(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Any(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Any(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial interface IAny
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Any.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Any.TypeConverter.cs
new file mode 100644
index 000000000000..ce383981237a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Any.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IAny ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Any.cs b/src/SelfHelp/generated/api/Models/Any.cs
new file mode 100644
index 000000000000..03b44e330d57
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Any.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAnyInternal
+ {
+
+ /// Creates an new instance.
+ public Any()
+ {
+
+ }
+ }
+ /// Any object
+ public partial interface IAny :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+
+ }
+ /// Any object
+ internal partial interface IAnyInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Any.json.cs b/src/SelfHelp/generated/api/Models/Any.json.cs
new file mode 100644
index 000000000000..b54e0e604045
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Any.json.cs
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Any(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Any(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.PowerShell.cs
new file mode 100644
index 000000000000..5c825880fb5c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.PowerShell.cs
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Response for whether the requested resource name is available or not.
+ [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityResponseTypeConverter))]
+ public partial class CheckNameAvailabilityResponse
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CheckNameAvailabilityResponse(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("NameAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Reason"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CheckNameAvailabilityResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("NameAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Reason"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CheckNameAvailabilityResponse(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.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CheckNameAvailabilityResponse(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.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Response for whether the requested resource name is available or not.
+ [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityResponseTypeConverter))]
+ public partial interface ICheckNameAvailabilityResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.TypeConverter.cs
new file mode 100644
index 000000000000..b1b34dea6dc1
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CheckNameAvailabilityResponseTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CheckNameAvailabilityResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CheckNameAvailabilityResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CheckNameAvailabilityResponse.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.cs b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.cs
new file mode 100644
index 000000000000..6827b2b78e44
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.cs
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Response for whether the requested resource name is available or not.
+ public partial class CheckNameAvailabilityResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponseInternal
+ {
+
+ /// Backing field for property.
+ private string _message;
+
+ ///
+ /// Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Message { get => this._message; set => this._message = value; }
+
+ /// Backing field for property.
+ private bool? _nameAvailable;
+
+ /// Returns true or false depending on the availability of the name
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public bool? NameAvailable { get => this._nameAvailable; set => this._nameAvailable = value; }
+
+ /// Backing field for property.
+ private string _reason;
+
+ ///
+ /// Reason for why value is not available. This field is returned if nameAvailable is false.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Reason { get => this._reason; set => this._reason = value; }
+
+ /// Creates an new instance.
+ public CheckNameAvailabilityResponse()
+ {
+
+ }
+ }
+ /// Response for whether the requested resource name is available or not.
+ public partial interface ICheckNameAvailabilityResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+ /// Returns true or false depending on the availability of the name
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Returns true or false depending on the availability of the name",
+ SerializedName = @"nameAvailable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? NameAvailable { get; set; }
+ ///
+ /// Reason for why value is not available. This field is returned if nameAvailable is false.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Reason for why value is not available. This field is returned if nameAvailable is false.",
+ SerializedName = @"reason",
+ PossibleTypes = new [] { typeof(string) })]
+ string Reason { get; set; }
+
+ }
+ /// Response for whether the requested resource name is available or not.
+ internal partial interface ICheckNameAvailabilityResponseInternal
+
+ {
+ ///
+ /// Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.
+ ///
+ string Message { get; set; }
+ /// Returns true or false depending on the availability of the name
+ bool? NameAvailable { get; set; }
+ ///
+ /// Reason for why value is not available. This field is returned if nameAvailable is false.
+ ///
+ string Reason { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.json.cs
new file mode 100644
index 000000000000..2213bfe87bf8
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/CheckNameAvailabilityResponse.json.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Response for whether the requested resource name is available or not.
+ public partial class CheckNameAvailabilityResponse
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal CheckNameAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;}
+ {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ICheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new CheckNameAvailabilityResponse(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable" ,container.Add );
+ AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add );
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.PowerShell.cs
new file mode 100644
index 000000000000..395ab7bed9ee
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.PowerShell.cs
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Properties returned with in an insight.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticTypeConverter))]
+ public partial class Diagnostic
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Diagnostic(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.SelfHelp.Models.Api20230601.IDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Diagnostic(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Diagnostic(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.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Status"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.InsightTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Diagnostic(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.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Status"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.InsightTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.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.SelfHelp.Models.Api20230601.IDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Properties returned with in an insight.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticTypeConverter))]
+ public partial interface IDiagnostic
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.TypeConverter.cs
new file mode 100644
index 000000000000..78448fcc9fea
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnostic ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Diagnostic.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Diagnostic.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Diagnostic.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.cs b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.cs
new file mode 100644
index 000000000000..8c7bccca7982
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.cs
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Properties returned with in an insight.
+ public partial class Diagnostic :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal
+ {
+
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Code; }
+
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Detail = value ?? null /* arrayOf */; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError _error;
+
+ /// Error definition.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Error()); set => this._error = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[] _insight;
+
+ /// The problems (if any) detected by this insight.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[] Insight { get => this._insight; set => this._insight = value; }
+
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Code = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Error()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Message = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Type = value; }
+
+ /// Backing field for property.
+ private string _solutionId;
+
+ /// Solution Id
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string SolutionId { get => this._solutionId; set => this._solutionId = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? _status;
+
+ /// Denotes the status of the diagnostic resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get => this._status; set => this._status = value; }
+
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)Error).Type; }
+
+ /// Creates an new instance.
+ public Diagnostic()
+ {
+
+ }
+ }
+ /// Properties returned with in an insight.
+ public partial interface IDiagnostic :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; }
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"An array of additional nested error response info objects, as described by this contract.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get; set; }
+ /// The problems (if any) detected by this insight.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The problems (if any) detected by this insight.",
+ SerializedName = @"insights",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[] Insight { get; set; }
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Description of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Solution Id
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Id",
+ SerializedName = @"solutionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionId { get; set; }
+ /// Denotes the status of the diagnostic resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Denotes the status of the diagnostic resource.",
+ SerializedName = @"status",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; }
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Service specific error type which serves as additional context for the error herein.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// Properties returned with in an insight.
+ internal partial interface IDiagnosticInternal
+
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ string Code { get; set; }
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get; set; }
+ /// Error definition.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError Error { get; set; }
+ /// The problems (if any) detected by this insight.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight[] Insight { get; set; }
+ /// Description of the error.
+ string Message { get; set; }
+ /// Solution Id
+ string SolutionId { get; set; }
+ /// Denotes the status of the diagnostic resource.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; }
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.json.cs
new file mode 100644
index 000000000000..8a04e9d5c83b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Diagnostic.json.cs
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Properties returned with in an insight.
+ public partial class Diagnostic
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Diagnostic(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.Error.FromJson(__jsonError) : Error;}
+ {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;}
+ {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;}
+ {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Insight.FromJson(__u) )) ))() : null : Insight;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Diagnostic(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add );
+ AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add );
+ if (null != this._insight)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __x in this._insight )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("insights",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.PowerShell.cs
new file mode 100644
index 000000000000..fddaf2d9e6b3
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.PowerShell.cs
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Solution Invocation with additional params needed for invocation.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticInvocationTypeConverter))]
+ public partial class DiagnosticInvocation
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiagnosticInvocation(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.SelfHelp.Models.Api20230601.IDiagnosticInvocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiagnosticInvocation(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiagnosticInvocation(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("AdditionalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal DiagnosticInvocation(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("AdditionalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParametersTypeConverter.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.SelfHelp.Models.Api20230601.IDiagnosticInvocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Solution Invocation with additional params needed for invocation.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticInvocationTypeConverter))]
+ public partial interface IDiagnosticInvocation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.TypeConverter.cs
new file mode 100644
index 000000000000..bfba23410bfa
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticInvocationTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticInvocation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiagnosticInvocation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiagnosticInvocation.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiagnosticInvocation.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.cs
new file mode 100644
index 000000000000..47c720abe8e1
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Solution Invocation with additional params needed for invocation.
+ public partial class DiagnosticInvocation :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters _additionalParameter;
+
+ /// Additional parameters required to invoke the solutionId.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get => (this._additionalParameter = this._additionalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParameters()); set => this._additionalParameter = value; }
+
+ /// Backing field for property.
+ private string _solutionId;
+
+ /// Solution Id to invoke.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string SolutionId { get => this._solutionId; set => this._solutionId = value; }
+
+ /// Creates an new instance.
+ public DiagnosticInvocation()
+ {
+
+ }
+ }
+ /// Solution Invocation with additional params needed for invocation.
+ public partial interface IDiagnosticInvocation :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// Additional parameters required to invoke the solutionId.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Additional parameters required to invoke the solutionId.",
+ SerializedName = @"additionalParameters",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; }
+ /// Solution Id to invoke.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Id to invoke.",
+ SerializedName = @"solutionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionId { get; set; }
+
+ }
+ /// Solution Invocation with additional params needed for invocation.
+ internal partial interface IDiagnosticInvocationInternal
+
+ {
+ /// Additional parameters required to invoke the solutionId.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; }
+ /// Solution Id to invoke.
+ string SolutionId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.json.cs
new file mode 100644
index 000000000000..360e6e829d33
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocation.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Solution Invocation with additional params needed for invocation.
+ public partial class DiagnosticInvocation
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal DiagnosticInvocation(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;}
+ {_additionalParameter = If( json?.PropertyT("additionalParameters"), out var __jsonAdditionalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParameters.FromJson(__jsonAdditionalParameters) : AdditionalParameter;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticInvocation(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add );
+ AddIf( null != this._additionalParameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._additionalParameter.ToJson(null,serializationMode) : null, "additionalParameters" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.PowerShell.cs
new file mode 100644
index 000000000000..d749b4b4e0d7
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.PowerShell.cs
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Additional parameters required to invoke the solutionId.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticInvocationAdditionalParametersTypeConverter))]
+ public partial class DiagnosticInvocationAdditionalParameters
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiagnosticInvocationAdditionalParameters(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.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiagnosticInvocationAdditionalParameters(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiagnosticInvocationAdditionalParameters(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 DiagnosticInvocationAdditionalParameters(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);
+ }
+
+ ///
+ /// 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.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Additional parameters required to invoke the solutionId.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticInvocationAdditionalParametersTypeConverter))]
+ public partial interface IDiagnosticInvocationAdditionalParameters
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.TypeConverter.cs
new file mode 100644
index 000000000000..d974e47c9a43
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.TypeConverter.cs
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticInvocationAdditionalParametersTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiagnosticInvocationAdditionalParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiagnosticInvocationAdditionalParameters.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiagnosticInvocationAdditionalParameters.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.cs
new file mode 100644
index 000000000000..23e6dad7f91a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Additional parameters required to invoke the solutionId.
+ public partial class DiagnosticInvocationAdditionalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParametersInternal
+ {
+
+ ///
+ /// Creates an new instance.
+ ///
+ public DiagnosticInvocationAdditionalParameters()
+ {
+
+ }
+ }
+ /// Additional parameters required to invoke the solutionId.
+ public partial interface IDiagnosticInvocationAdditionalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Additional parameters required to invoke the solutionId.
+ internal partial interface IDiagnosticInvocationAdditionalParametersInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.dictionary.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.dictionary.cs
new file mode 100644
index 000000000000..3b2442d3e5e4
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ public partial class DiagnosticInvocationAdditionalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api20230601.DiagnosticInvocationAdditionalParameters source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.json.cs
new file mode 100644
index 000000000000..cb5eebd10272
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticInvocationAdditionalParameters.json.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Additional parameters required to invoke the solutionId.
+ public partial class DiagnosticInvocationAdditionalParameters
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal DiagnosticInvocationAdditionalParameters(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocationAdditionalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticInvocationAdditionalParameters(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.PowerShell.cs
new file mode 100644
index 000000000000..dd5c60c4b6e7
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.PowerShell.cs
@@ -0,0 +1,284 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Diagnostic resource
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))]
+ public partial class DiagnosticResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiagnosticResource(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.SelfHelp.Models.Api20230601.IDiagnosticResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiagnosticResource(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiagnosticResource(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.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("GlobalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AcceptedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString);
+ }
+ if (content.Contains("Diagnostic"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal DiagnosticResource(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.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("GlobalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AcceptedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString);
+ }
+ if (content.Contains("Diagnostic"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticTypeConverter.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.SelfHelp.Models.Api20230601.IDiagnosticResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Diagnostic resource
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))]
+ public partial interface IDiagnosticResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.TypeConverter.cs
new file mode 100644
index 000000000000..f2ddd7a6bc02
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticResourceTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiagnosticResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiagnosticResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiagnosticResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.cs
new file mode 100644
index 000000000000..9f4639879885
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.cs
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic resource
+ public partial class DiagnosticResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource();
+
+ /// Diagnostic Request Accepted time.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; }
+
+ /// Array of Diagnostics.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; }
+
+ /// Global parameters that can be passed to all solutionIds.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter = value ?? null /* model class */; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; }
+
+ /// SolutionIds that are needed to be invoked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).Insight; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).Insight = value ?? null /* arrayOf */; }
+
+ /// Internal Acessors for AcceptedAt
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal.AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt = value; }
+
+ /// Internal Acessors for Diagnostic
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).Diagnostic = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourceProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties _property;
+
+ /// Diagnostic Resource properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourceProperties()); set => this._property = value; }
+
+ /// Status of diagnostic provisioning.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public DiagnosticResource()
+ {
+
+ }
+
+ /// 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.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Diagnostic resource
+ public partial interface IDiagnosticResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource
+ {
+ /// Diagnostic Request Accepted time.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Diagnostic Request Accepted time.",
+ SerializedName = @"acceptedAt",
+ PossibleTypes = new [] { typeof(string) })]
+ string AcceptedAt { get; }
+ /// Array of Diagnostics.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Array of Diagnostics.",
+ SerializedName = @"diagnostics",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get; }
+ /// Global parameters that can be passed to all solutionIds.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Global parameters that can be passed to all solutionIds.",
+ SerializedName = @"globalParameters",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; }
+ /// SolutionIds that are needed to be invoked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"SolutionIds that are needed to be invoked.",
+ SerializedName = @"insights",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get; set; }
+ /// Status of diagnostic provisioning.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Status of diagnostic provisioning.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get; }
+
+ }
+ /// Diagnostic resource
+ internal partial interface IDiagnosticResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal
+ {
+ /// Diagnostic Request Accepted time.
+ string AcceptedAt { get; set; }
+ /// Array of Diagnostics.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get; set; }
+ /// Global parameters that can be passed to all solutionIds.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; }
+ /// SolutionIds that are needed to be invoked.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get; set; }
+ /// Diagnostic Resource properties.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties Property { get; set; }
+ /// Status of diagnostic provisioning.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.json.cs
new file mode 100644
index 000000000000..fa888a5a6b0c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResource.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic resource
+ public partial class DiagnosticResource
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal DiagnosticResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourceProperties.FromJson(__jsonProperties) : Property;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResource(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.PowerShell.cs
new file mode 100644
index 000000000000..05e4f718d8d1
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.PowerShell.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Diagnostic resource properties.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesTypeConverter))]
+ public partial class DiagnosticResourceProperties
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiagnosticResourceProperties(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.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiagnosticResourceProperties(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiagnosticResourceProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("GlobalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AcceptedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("Diagnostic"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal DiagnosticResourceProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("GlobalParameter"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Insight"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AcceptedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("Diagnostic"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticTypeConverter.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.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Diagnostic resource properties.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesTypeConverter))]
+ public partial interface IDiagnosticResourceProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.TypeConverter.cs
new file mode 100644
index 000000000000..03e6f2f1cd94
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticResourcePropertiesTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiagnosticResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiagnosticResourceProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiagnosticResourceProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.cs
new file mode 100644
index 000000000000..918f186de8da
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.cs
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic resource properties.
+ public partial class DiagnosticResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _acceptedAt;
+
+ /// Diagnostic Request Accepted time.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string AcceptedAt { get => this._acceptedAt; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] _diagnostic;
+
+ /// Array of Diagnostics.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get => this._diagnostic; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters _globalParameter;
+
+ /// Global parameters that can be passed to all solutionIds.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => (this._globalParameter = this._globalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParameters()); set => this._globalParameter = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] _insight;
+
+ /// SolutionIds that are needed to be invoked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get => this._insight; set => this._insight = value; }
+
+ /// Internal Acessors for AcceptedAt
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal.AcceptedAt { get => this._acceptedAt; set { {_acceptedAt = value;} } }
+
+ /// Internal Acessors for Diagnostic
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal.Diagnostic { get => this._diagnostic; set { {_diagnostic = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? _provisioningState;
+
+ /// Status of diagnostic provisioning.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; }
+
+ /// Creates an new instance.
+ public DiagnosticResourceProperties()
+ {
+
+ }
+ }
+ /// Diagnostic resource properties.
+ public partial interface IDiagnosticResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// Diagnostic Request Accepted time.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Diagnostic Request Accepted time.",
+ SerializedName = @"acceptedAt",
+ PossibleTypes = new [] { typeof(string) })]
+ string AcceptedAt { get; }
+ /// Array of Diagnostics.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Array of Diagnostics.",
+ SerializedName = @"diagnostics",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get; }
+ /// Global parameters that can be passed to all solutionIds.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Global parameters that can be passed to all solutionIds.",
+ SerializedName = @"globalParameters",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; }
+ /// SolutionIds that are needed to be invoked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"SolutionIds that are needed to be invoked.",
+ SerializedName = @"insights",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get; set; }
+ /// Status of diagnostic provisioning.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Status of diagnostic provisioning.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get; }
+
+ }
+ /// Diagnostic resource properties.
+ internal partial interface IDiagnosticResourcePropertiesInternal
+
+ {
+ /// Diagnostic Request Accepted time.
+ string AcceptedAt { get; set; }
+ /// Array of Diagnostics.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic[] Diagnostic { get; set; }
+ /// Global parameters that can be passed to all solutionIds.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; }
+ /// SolutionIds that are needed to be invoked.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticInvocation[] Insight { get; set; }
+ /// Status of diagnostic provisioning.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ProvisioningState? ProvisioningState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.json.cs
new file mode 100644
index 000000000000..c49e1031f7e9
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourceProperties.json.cs
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic resource properties.
+ public partial class DiagnosticResourceProperties
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal DiagnosticResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_globalParameter = If( json?.PropertyT("globalParameters"), out var __jsonGlobalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParameters.FromJson(__jsonGlobalParameters) : GlobalParameter;}
+ {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticInvocation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticInvocation.FromJson(__u) )) ))() : null : Insight;}
+ {_acceptedAt = If( json?.PropertyT("acceptedAt"), out var __jsonAcceptedAt) ? (string)__jsonAcceptedAt : (string)AcceptedAt;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? If( __jsonDiagnostics as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Diagnostic.FromJson(__p) )) ))() : null : Diagnostic;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResourceProperties(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._globalParameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._globalParameter.ToJson(null,serializationMode) : null, "globalParameters" ,container.Add );
+ if (null != this._insight)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __x in this._insight )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("insights",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._acceptedAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._acceptedAt.ToString()) : null, "acceptedAt" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._diagnostic)
+ {
+ var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __s in this._diagnostic )
+ {
+ AddIf(__s?.ToJson(null, serializationMode) ,__r.Add);
+ }
+ container.Add("diagnostics",__r);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs
new file mode 100644
index 000000000000..f0a5a5c07ff8
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Global parameters that can be passed to all solutionIds.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesGlobalParametersTypeConverter))]
+ public partial class DiagnosticResourcePropertiesGlobalParameters
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiagnosticResourcePropertiesGlobalParameters(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.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiagnosticResourcePropertiesGlobalParameters(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiagnosticResourcePropertiesGlobalParameters(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 DiagnosticResourcePropertiesGlobalParameters(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);
+ }
+
+ ///
+ /// 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.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Global parameters that can be passed to all solutionIds.
+ [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesGlobalParametersTypeConverter))]
+ public partial interface IDiagnosticResourcePropertiesGlobalParameters
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs
new file mode 100644
index 000000000000..40c9646ba530
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiagnosticResourcePropertiesGlobalParametersTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiagnosticResourcePropertiesGlobalParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiagnosticResourcePropertiesGlobalParameters.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiagnosticResourcePropertiesGlobalParameters.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.cs
new file mode 100644
index 000000000000..40774c196ccd
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Global parameters that can be passed to all solutionIds.
+ public partial class DiagnosticResourcePropertiesGlobalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParametersInternal
+ {
+
+ ///
+ /// Creates an new instance.
+ ///
+ public DiagnosticResourcePropertiesGlobalParameters()
+ {
+
+ }
+ }
+ /// Global parameters that can be passed to all solutionIds.
+ public partial interface IDiagnosticResourcePropertiesGlobalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Global parameters that can be passed to all solutionIds.
+ internal partial interface IDiagnosticResourcePropertiesGlobalParametersInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs
new file mode 100644
index 000000000000..48e3f0a69d9a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ public partial class DiagnosticResourcePropertiesGlobalParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api20230601.DiagnosticResourcePropertiesGlobalParameters source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.json.cs
new file mode 100644
index 000000000000..19bf22e2de8f
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiagnosticResourcePropertiesGlobalParameters.json.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Global parameters that can be passed to all solutionIds.
+ public partial class DiagnosticResourcePropertiesGlobalParameters
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal DiagnosticResourcePropertiesGlobalParameters(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResourcePropertiesGlobalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResourcePropertiesGlobalParameters(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.PowerShell.cs
new file mode 100644
index 000000000000..f9c6edff4e3b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.PowerShell.cs
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Discovery response.
+ [System.ComponentModel.TypeConverter(typeof(DiscoveryResponseTypeConverter))]
+ public partial class DiscoveryResponse
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DiscoveryResponse(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.SelfHelp.Models.Api20230601.IDiscoveryResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DiscoveryResponse(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal DiscoveryResponse(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.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)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 DiscoveryResponse(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.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Discovery response.
+ [System.ComponentModel.TypeConverter(typeof(DiscoveryResponseTypeConverter))]
+ public partial interface IDiscoveryResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.TypeConverter.cs
new file mode 100644
index 000000000000..8ac47fede665
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class DiscoveryResponseTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IDiscoveryResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return DiscoveryResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return DiscoveryResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return DiscoveryResponse.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.cs
new file mode 100644
index 000000000000..534625bbd84c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Discovery response.
+ public partial class DiscoveryResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponseInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The link used to get the next page of solution metadata.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[] _value;
+
+ /// The list of solution metadata.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public DiscoveryResponse()
+ {
+
+ }
+ }
+ /// Discovery response.
+ public partial interface IDiscoveryResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The link used to get the next page of solution metadata.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The link used to get the next page of solution metadata.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// The list of solution metadata.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The list of solution metadata.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[] Value { get; set; }
+
+ }
+ /// Discovery response.
+ internal partial interface IDiscoveryResponseInternal
+
+ {
+ /// The link used to get the next page of solution metadata.
+ string NextLink { get; set; }
+ /// The list of solution metadata.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.json.cs
new file mode 100644
index 000000000000..bd5de869a3b8
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/DiscoveryResponse.json.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Discovery response.
+ public partial class DiscoveryResponse
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal DiscoveryResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api20230601.ISolutionMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataResource.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiscoveryResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryResponse(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Error.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/Error.PowerShell.cs
new file mode 100644
index 000000000000..93cb3a20820c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Error.PowerShell.cs
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Error definition.
+ [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))]
+ public partial class Error
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Error(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.SelfHelp.Models.Api20230601.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Error(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Error(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.SelfHelp.Models.Api20230601.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Error(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.SelfHelp.Models.Api20230601.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ErrorTypeConverter.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.SelfHelp.Models.Api20230601.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Error definition.
+ [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))]
+ public partial interface IError
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Error.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/Error.TypeConverter.cs
new file mode 100644
index 000000000000..c4d1265f8297
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Error.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IError ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Error.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Error.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Error.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Error.cs b/src/SelfHelp/generated/api/Models/Api20230601/Error.cs
new file mode 100644
index 000000000000..7471cc498c86
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Error.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Error definition.
+ public partial class Error :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal
+ {
+
+ /// 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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] _detail;
+
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get => this._detail; set => this._detail = value; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IErrorInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _type;
+
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public Error()
+ {
+
+ }
+ }
+ /// Error definition.
+ public partial interface IError :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; }
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"An array of additional nested error response info objects, as described by this contract.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get; set; }
+ /// Description of the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Description of the error.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Service specific error type which serves as additional context for the error herein.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// Error definition.
+ internal partial interface IErrorInternal
+
+ {
+ ///
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ ///
+ string Code { get; set; }
+ ///
+ /// An array of additional nested error response info objects, as described by this contract.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError[] Detail { get; set; }
+ /// Description of the error.
+ string Message { get; set; }
+ ///
+ /// Service specific error type which serves as additional context for the error herein.
+ ///
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Error.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/Error.json.cs
new file mode 100644
index 000000000000..8244746f9264
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Error.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Error definition.
+ public partial class Error
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Error(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_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.SelfHelp.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.SelfHelp.Models.Api20230601.IError) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.Error.FromJson(__u) )) ))() : null : Detail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Error(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/src/SelfHelp/generated/api/Models/Api20230601/Insight.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/Insight.PowerShell.cs
new file mode 100644
index 000000000000..a5eff20eed85
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Insight.PowerShell.cs
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(InsightTypeConverter))]
+ public partial class Insight
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Insight(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.SelfHelp.Models.Api20230601.IInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Insight(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.SelfHelp.Models.Api20230601.IInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Insight(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.SelfHelp.Models.Api20230601.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Result"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Result, global::System.Convert.ToString);
+ }
+ if (content.Contains("ImportanceLevel"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Insight(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.SelfHelp.Models.Api20230601.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Title"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Title, global::System.Convert.ToString);
+ }
+ if (content.Contains("Result"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).Result, global::System.Convert.ToString);
+ }
+ if (content.Contains("ImportanceLevel"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ [System.ComponentModel.TypeConverter(typeof(InsightTypeConverter))]
+ public partial interface IInsight
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Insight.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/Insight.TypeConverter.cs
new file mode 100644
index 000000000000..df0fa485b69f
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Insight.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class InsightTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.IInsight ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Insight.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Insight.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Insight.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Insight.cs b/src/SelfHelp/generated/api/Models/Api20230601/Insight.cs
new file mode 100644
index 000000000000..160b22813534
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Insight.cs
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ ///
+ public partial class Insight :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsightInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Article id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? _importanceLevel;
+
+ /// Importance level of the insight.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get => this._importanceLevel; set => this._importanceLevel = value; }
+
+ /// Backing field for property.
+ private string _result;
+
+ /// Detailed result content.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Result { get => this._result; set => this._result = value; }
+
+ /// Backing field for property.
+ private string _title;
+
+ /// This insight's title.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Title { get => this._title; set => this._title = value; }
+
+ /// Creates an new instance.
+ public Insight()
+ {
+
+ }
+ }
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ public partial interface IInsight :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// Article id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Article id.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// Importance level of the insight.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Importance level of the insight.",
+ SerializedName = @"importanceLevel",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get; set; }
+ /// Detailed result content.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Detailed result content.",
+ SerializedName = @"results",
+ PossibleTypes = new [] { typeof(string) })]
+ string Result { get; set; }
+ /// This insight's title.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"This insight's title.",
+ SerializedName = @"title",
+ PossibleTypes = new [] { typeof(string) })]
+ string Title { get; set; }
+
+ }
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ internal partial interface IInsightInternal
+
+ {
+ /// Article id.
+ string Id { get; set; }
+ /// Importance level of the insight.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get; set; }
+ /// Detailed result content.
+ string Result { get; set; }
+ /// This insight's title.
+ string Title { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/Insight.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/Insight.json.cs
new file mode 100644
index 000000000000..d19d81507710
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/Insight.json.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Detailed insights(s) obtained via the invocation of an insight diagnostic troubleshooter.
+ ///
+ public partial class Insight
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Insight(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Insight(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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;}
+ {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;}
+ {_result = If( json?.PropertyT("results"), out var __jsonResults) ? (string)__jsonResults : (string)Result;}
+ {_importanceLevel = If( json?.PropertyT("importanceLevel"), out var __jsonImportanceLevel) ? (string)__jsonImportanceLevel : (string)ImportanceLevel;}
+ 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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add );
+ AddIf( null != (((object)this._result)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._result.ToString()) : null, "results" ,container.Add );
+ AddIf( null != (((object)this._importanceLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._importanceLevel.ToString()) : null, "importanceLevel" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.PowerShell.cs
new file mode 100644
index 000000000000..5379b39ecada
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.PowerShell.cs
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Diagnostic solution metadata.
+ [System.ComponentModel.TypeConverter(typeof(SolutionMetadataPropertiesTypeConverter))]
+ public partial class SolutionMetadataProperties
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new SolutionMetadataProperties(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.SelfHelp.Models.Api20230601.ISolutionMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new SolutionMetadataProperties(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.SelfHelp.Models.Api20230601.ISolutionMetadataProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal SolutionMetadataProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequiredParameterSet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).RequiredParameterSet = (string[][]) content.GetValueForProperty("RequiredParameterSet",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).RequiredParameterSet, __y => TypeConverterExtensions.SelectToArray(__y, __w => TypeConverterExtensions.SelectToArray(__w, 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 SolutionMetadataProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).SolutionType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequiredParameterSet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).RequiredParameterSet = (string[][]) content.GetValueForProperty("RequiredParameterSet",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)this).RequiredParameterSet, __y => TypeConverterExtensions.SelectToArray(__y, __w => TypeConverterExtensions.SelectToArray(__w, 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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Diagnostic solution metadata.
+ [System.ComponentModel.TypeConverter(typeof(SolutionMetadataPropertiesTypeConverter))]
+ public partial interface ISolutionMetadataProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.TypeConverter.cs
new file mode 100644
index 000000000000..8300c3ceb02f
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class SolutionMetadataPropertiesTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.ISolutionMetadataProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return SolutionMetadataProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return SolutionMetadataProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return SolutionMetadataProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.cs
new file mode 100644
index 000000000000..77b315032b65
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic solution metadata.
+ public partial class SolutionMetadataProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// A detailed description of solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string[][] _requiredParameterSet;
+
+ /// Required parameters for invoking this particular solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string[][] RequiredParameterSet { get => this._requiredParameterSet; set => this._requiredParameterSet = value; }
+
+ /// Backing field for property.
+ private string _solutionId;
+
+ /// Solution Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string SolutionId { get => this._solutionId; set => this._solutionId = value; }
+
+ /// Backing field for property.
+ private string _solutionType;
+
+ /// Solution Type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string SolutionType { get => this._solutionType; set => this._solutionType = value; }
+
+ /// Creates an new instance.
+ public SolutionMetadataProperties()
+ {
+
+ }
+ }
+ /// Diagnostic solution metadata.
+ public partial interface ISolutionMetadataProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// A detailed description of solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A detailed description of solution.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Required parameters for invoking this particular solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Required parameters for invoking this particular solution.",
+ SerializedName = @"requiredParameterSets",
+ PossibleTypes = new [] { typeof(string) })]
+ string[][] RequiredParameterSet { get; set; }
+ /// Solution Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Id.",
+ SerializedName = @"solutionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionId { get; set; }
+ /// Solution Type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Type.",
+ SerializedName = @"solutionType",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionType { get; set; }
+
+ }
+ /// Diagnostic solution metadata.
+ internal partial interface ISolutionMetadataPropertiesInternal
+
+ {
+ /// A detailed description of solution.
+ string Description { get; set; }
+ /// Required parameters for invoking this particular solution.
+ string[][] RequiredParameterSet { get; set; }
+ /// Solution Id.
+ string SolutionId { get; set; }
+ /// Solution Type.
+ string SolutionType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.json.cs
new file mode 100644
index 000000000000..db4edbd76806
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataProperties.json.cs
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Diagnostic solution metadata.
+ public partial class SolutionMetadataProperties
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionMetadataProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal SolutionMetadataProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;}
+ {_solutionType = If( json?.PropertyT("solutionType"), out var __jsonSolutionType) ? (string)__jsonSolutionType : (string)SolutionType;}
+ {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;}
+ {_requiredParameterSet = If( json?.PropertyT("requiredParameterSets"), out var __jsonRequiredParameterSets) ? If( __jsonRequiredParameterSets as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __u) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__u, (__t)=>(string[]) (If( __t as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __s) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__s, (__r)=>(string) (__r is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __q ? (string)(__q.ToString()) : null)) ))() : null /* arrayOf */)) ))() : null : RequiredParameterSet;}
+ 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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add );
+ AddIf( null != (((object)this._solutionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionType.ToString()) : null, "solutionType" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ if (null != this._requiredParameterSet)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __x in this._requiredParameterSet )
+ {
+ AddIf(null != __x ? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(global::System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__x, (__v) => null != (((object)__v)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(__v.ToString()) : null))) : null ,__w.Add);
+ }
+ container.Add("requiredParameterSets",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.PowerShell.cs
new file mode 100644
index 000000000000..adf02719792a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.PowerShell.cs
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Solution Metadata resource
+ [System.ComponentModel.TypeConverter(typeof(SolutionMetadataResourceTypeConverter))]
+ public partial class SolutionMetadataResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new SolutionMetadataResource(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.SelfHelp.Models.Api20230601.ISolutionMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new SolutionMetadataResource(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.SelfHelp.Models.Api20230601.ISolutionMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal SolutionMetadataResource(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.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequiredParameterSet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).RequiredParameterSet = (string[][]) content.GetValueForProperty("RequiredParameterSet",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).RequiredParameterSet, __y => TypeConverterExtensions.SelectToArray(__y, __w => TypeConverterExtensions.SelectToArray(__w, 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 SolutionMetadataResource(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.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("SolutionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).SolutionType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequiredParameterSet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).RequiredParameterSet = (string[][]) content.GetValueForProperty("RequiredParameterSet",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal)this).RequiredParameterSet, __y => TypeConverterExtensions.SelectToArray(__y, __w => TypeConverterExtensions.SelectToArray(__w, 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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Solution Metadata resource
+ [System.ComponentModel.TypeConverter(typeof(SolutionMetadataResourceTypeConverter))]
+ public partial interface ISolutionMetadataResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.TypeConverter.cs
new file mode 100644
index 000000000000..69e0faa5591b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.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.SelfHelp.Models.Api20230601
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class SolutionMetadataResourceTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20230601.ISolutionMetadataResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return SolutionMetadataResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return SolutionMetadataResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return SolutionMetadataResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.cs
new file mode 100644
index 000000000000..3edb3ae1e7c5
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Solution Metadata resource
+ public partial class SolutionMetadataResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource();
+
+ /// A detailed description of solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).Description = value ?? null; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties _property;
+
+ /// Solution metadata Resource properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataProperties()); set => this._property = value; }
+
+ /// Required parameters for invoking this particular solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string[][] RequiredParameterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).RequiredParameterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).RequiredParameterSet = value ?? null /* arrayOf */; }
+
+ /// Solution Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).SolutionId = value ?? null; }
+
+ /// Solution Type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string SolutionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).SolutionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataPropertiesInternal)Property).SolutionType = value ?? null; }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public SolutionMetadataResource()
+ {
+
+ }
+
+ /// 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.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Solution Metadata resource
+ public partial interface ISolutionMetadataResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource
+ {
+ /// A detailed description of solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A detailed description of solution.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Required parameters for invoking this particular solution.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Required parameters for invoking this particular solution.",
+ SerializedName = @"requiredParameterSets",
+ PossibleTypes = new [] { typeof(string) })]
+ string[][] RequiredParameterSet { get; set; }
+ /// Solution Id.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Id.",
+ SerializedName = @"solutionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionId { get; set; }
+ /// Solution Type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Solution Type.",
+ SerializedName = @"solutionType",
+ PossibleTypes = new [] { typeof(string) })]
+ string SolutionType { get; set; }
+
+ }
+ /// Solution Metadata resource
+ internal partial interface ISolutionMetadataResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal
+ {
+ /// A detailed description of solution.
+ string Description { get; set; }
+ /// Solution metadata Resource properties.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataProperties Property { get; set; }
+ /// Required parameters for invoking this particular solution.
+ string[][] RequiredParameterSet { get; set; }
+ /// Solution Id.
+ string SolutionId { get; set; }
+ /// Solution Type.
+ string SolutionType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.json.cs b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.json.cs
new file mode 100644
index 000000000000..a378ead7fe56
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api20230601/SolutionMetadataResource.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.SelfHelp.Models.Api20230601
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Solution Metadata resource
+ public partial class SolutionMetadataResource
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.ISolutionMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionMetadataResource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal SolutionMetadataResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.SolutionMetadataProperties.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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.PowerShell.cs
new file mode 100644
index 000000000000..04266d7acb8b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.PowerShell.cs
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// The check availability request body.
+ [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityRequestTypeConverter))]
+ public partial class CheckNameAvailabilityRequest
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CheckNameAvailabilityRequest(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)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 CheckNameAvailabilityRequest(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CheckNameAvailabilityRequest(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.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CheckNameAvailabilityRequest(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.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// The check availability request body.
+ [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityRequestTypeConverter))]
+ public partial interface ICheckNameAvailabilityRequest
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.TypeConverter.cs
new file mode 100644
index 000000000000..9207352876e1
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.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.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CheckNameAvailabilityRequestTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CheckNameAvailabilityRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CheckNameAvailabilityRequest.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CheckNameAvailabilityRequest.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.cs b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.cs
new file mode 100644
index 000000000000..a16293223a79
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The check availability request body.
+ public partial class CheckNameAvailabilityRequest :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequestInternal
+ {
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the resource for which availability needs to be checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Type { get => this._type; set => this._type = value; }
+
+ /// Creates an new instance.
+ public CheckNameAvailabilityRequest()
+ {
+
+ }
+ }
+ /// The check availability request body.
+ public partial interface ICheckNameAvailabilityRequest :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The name of the resource for which availability needs to be checked.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the resource for which availability needs to be checked.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; set; }
+
+ }
+ /// The check availability request body.
+ internal partial interface ICheckNameAvailabilityRequestInternal
+
+ {
+ /// The name of the resource for which availability needs to be checked.
+ string Name { get; set; }
+ /// The resource type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.json.cs b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.json.cs
new file mode 100644
index 000000000000..d3bee0092661
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/CheckNameAvailabilityRequest.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.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The check availability request body.
+ public partial class CheckNameAvailabilityRequest
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal CheckNameAvailabilityRequest(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new CheckNameAvailabilityRequest(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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs
new file mode 100644
index 000000000000..9d9ece55a3df
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// The resource management error additional info.
+ [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))]
+ public partial class ErrorAdditionalInfo
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorAdditionalInfo(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorAdditionalInfo(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Info"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Info"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// The resource management error additional info.
+ [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))]
+ public partial interface IErrorAdditionalInfo
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs
new file mode 100644
index 000000000000..873ab45ae540
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..f3125c0c6e4b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The resource management error additional info.
+ public partial class ErrorAdditionalInfo :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny _info;
+
+ /// The additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any()); }
+
+ /// Internal Acessors for Info
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any()); set { {_info = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The additional info type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public ErrorAdditionalInfo()
+ {
+
+ }
+ }
+ /// The resource management error additional info.
+ public partial interface IErrorAdditionalInfo :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The additional info.",
+ SerializedName = @"info",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Info { get; }
+ /// The additional info type.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The additional info type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// The resource management error additional info.
+ internal partial interface IErrorAdditionalInfoInternal
+
+ {
+ /// The additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Info { get; set; }
+ /// The additional info type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs
new file mode 100644
index 000000000000..d2ae27f4f05e
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The resource management error additional info.
+ public partial class ErrorAdditionalInfo
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any.FromJson(__jsonInfo) : Info;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.PowerShell.cs
new file mode 100644
index 000000000000..90430e419916
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.PowerShell.cs
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// The error detail.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))]
+ public partial class ErrorDetail
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorDetail(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorDetail(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorDetail(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorDetail(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// The error detail.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))]
+ public partial interface IErrorDetail
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs
new file mode 100644
index 000000000000..ff34ae2a2688
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IErrorDetail ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorDetail.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorDetail.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.cs
new file mode 100644
index 000000000000..6d6d31b4b080
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.cs
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The error detail.
+ public partial class ErrorDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] _additionalInfo;
+
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; }
+
+ /// Backing field for property.
+ private string _code;
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] _detail;
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get => this._detail; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for AdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for Target
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } }
+
+ /// Backing field for property.
+ private string _target;
+
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Target { get => this._target; }
+
+ /// Creates an new instance.
+ public ErrorDetail()
+ {
+
+ }
+ }
+ /// The error detail.
+ public partial interface IErrorDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error additional info.",
+ SerializedName = @"additionalInfo",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error target.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; }
+
+ }
+ /// The error detail.
+ internal partial interface IErrorDetailInternal
+
+ {
+ /// The error additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; }
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get; set; }
+ /// The error message.
+ string Message { get; set; }
+ /// The error target.
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.json.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.json.cs
new file mode 100644
index 000000000000..894e0b98de03
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorDetail.json.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.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// The error detail.
+ public partial class ErrorDetail
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;}
+ {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetail.FromJson(__u) )) ))() : null : Detail;}
+ {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __x in this._detail )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("details",__w);
+ }
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._additionalInfo)
+ {
+ var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray();
+ foreach( var __s in this._additionalInfo )
+ {
+ AddIf(__s?.ToJson(null, serializationMode) ,__r.Add);
+ }
+ container.Add("additionalInfo",__r);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..fbec2c87507b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.PowerShell.cs
@@ -0,0 +1,208 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial interface IErrorResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..1a6833aa6bde
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/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.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorResponse.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.cs
new file mode 100644
index 000000000000..af4dfea00fd4
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal
+ {
+
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; }
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Code; }
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Detail; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail _error;
+
+ /// The error object.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetail()); set => this._error = value; }
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Message; }
+
+ /// Internal Acessors for AdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo = value; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Code = value; }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Detail = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorDetail()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Message = value; }
+
+ /// Internal Acessors for Target
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Target = value; }
+
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetailInternal)Error).Target; }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error additional info.",
+ SerializedName = @"additionalInfo",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error target.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; }
+
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ internal partial interface IErrorResponseInternal
+
+ {
+ /// The error additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; }
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail[] Detail { get; set; }
+ /// The error object.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorDetail Error { get; set; }
+ /// The error message.
+ string Message { get; set; }
+ /// The error target.
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.json.cs b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.json.cs
new file mode 100644
index 000000000000..7607ab618cd9
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ErrorResponse.json.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.ErrorDetail.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Operation.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/Operation.PowerShell.cs
new file mode 100644
index 000000000000..73b91e3047d4
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Operation.PowerShell.cs
@@ -0,0 +1,230 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial class Operation
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin.CreateFrom);
+ }
+ if (content.Contains("ActionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType.CreateFrom);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin.CreateFrom);
+ }
+ if (content.Contains("ActionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType.CreateFrom);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Operation.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..f7584269305c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/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.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Operation.cs b/src/SelfHelp/generated/api/Models/Api30/Operation.cs
new file mode 100644
index 000000000000..332e1aa758af
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Operation.cs
@@ -0,0 +1,256 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? _actionType;
+
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? ActionType { get => this._actionType; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay _display;
+
+ /// Localized display information for this particular operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplay()); set => this._display = value; }
+
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Description; }
+
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Operation; }
+
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Provider; }
+
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Resource; }
+
+ /// Backing field for property.
+ private bool? _isDataAction;
+
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public bool? IsDataAction { get => this._isDataAction; }
+
+ /// Internal Acessors for ActionType
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationDisplay()); set { {_display = value;} } }
+
+ /// Internal Acessors for DisplayDescription
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Description = value; }
+
+ /// Internal Acessors for DisplayOperation
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Operation = value; }
+
+ /// Internal Acessors for DisplayProvider
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Provider = value; }
+
+ /// Internal Acessors for DisplayResource
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)Display).Resource = value; }
+
+ /// Internal Acessors for IsDataAction
+ bool? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Origin
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? _origin;
+
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Origin { get => this._origin; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.",
+ SerializedName = @"actionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? ActionType { get; }
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; }
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.",
+ SerializedName = @"isDataAction",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsDataAction { get; }
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""",
+ SerializedName = @"origin",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Origin { get; }
+
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ internal partial interface IOperationInternal
+
+ {
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? ActionType { get; set; }
+ /// Localized display information for this particular operation.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay Display { get; set; }
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ string DisplayDescription { get; set; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ string DisplayOperation { get; set; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ string DisplayProvider { get; set; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ string DisplayResource { get; set; }
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ bool? IsDataAction { get; set; }
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ string Name { get; set; }
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Origin { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Operation.json.cs b/src/SelfHelp/generated/api/Models/Api30/Operation.json.cs
new file mode 100644
index 000000000000..a0bb93e86bb8
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Operation.json.cs
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ public partial class Operation
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;}
+ {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;}
+ {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..b0a800f8b34c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.PowerShell.cs
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Localized display information for this particular operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Localized display information for this particular operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..fbbbd69a4f44
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/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.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.cs b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.cs
new file mode 100644
index 000000000000..c2a7fcfcea1c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.cs
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Localized display information for this particular operation.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Description { get => this._description; }
+
+ /// Internal Acessors for Description
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } }
+
+ /// Internal Acessors for Operation
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } }
+
+ /// Internal Acessors for Provider
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } }
+
+ /// Internal Acessors for Resource
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } }
+
+ /// Backing field for property.
+ private string _operation;
+
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// Localized display information for this particular operation.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; }
+
+ }
+ /// Localized display information for this particular operation.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ string Description { get; set; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ string Operation { get; set; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ string Provider { get; set; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.json.cs b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.json.cs
new file mode 100644
index 000000000000..faf848dd84af
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationDisplay.json.cs
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Localized display information for this particular operation.
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationListResult.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.PowerShell.cs
new file mode 100644
index 000000000000..0e0375fce66c
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.PowerShell.cs
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))]
+ public partial class OperationListResult
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationListResult(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationListResult(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationListResult(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal OperationListResult(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))]
+ public partial interface IOperationListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationListResult.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.TypeConverter.cs
new file mode 100644
index 000000000000..df4d46c8ae95
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IOperationListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationListResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationListResult.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationListResult.cs b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.cs
new file mode 100644
index 000000000000..72c88f4b957b
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ ///
+ public partial class OperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Internal Acessors for Value
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// URL to get the next set of operation list results (if there are any).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[] _value;
+
+ /// List of operations supported by the resource provider
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[] Value { get => this._value; }
+
+ /// Creates an new instance.
+ public OperationListResult()
+ {
+
+ }
+ }
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ public partial interface IOperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// URL to get the next set of operation list results (if there are any).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"URL to get the next set of operation list results (if there are any).",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// List of operations supported by the resource provider
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"List of operations supported by the resource provider",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[] Value { get; }
+
+ }
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ internal partial interface IOperationListResultInternal
+
+ {
+ /// URL to get the next set of operation list results (if there are any).
+ string NextLink { get; set; }
+ /// List of operations supported by the resource provider
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/OperationListResult.json.cs b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.json.cs
new file mode 100644
index 000000000000..d4e5e2d8272a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/OperationListResult.json.cs
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ /// results.
+ ///
+ public partial class OperationListResult
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new OperationListResult(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api30.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ProxyResource.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.PowerShell.cs
new file mode 100644
index 000000000000..6b2de4fdc3e9
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.PowerShell.cs
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))]
+ public partial class ProxyResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ProxyResource(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ProxyResource(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ProxyResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ProxyResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))]
+ public partial interface IProxyResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ProxyResource.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.TypeConverter.cs
new file mode 100644
index 000000000000..9fa5718ce541
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IProxyResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ProxyResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ProxyResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ProxyResource.cs b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.cs
new file mode 100644
index 000000000000..e576ab9e3806
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ ///
+ public partial class ProxyResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource();
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Name; }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public ProxyResource()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ public partial interface IProxyResource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource
+ {
+
+ }
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ internal partial interface IProxyResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/ProxyResource.json.cs b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.json.cs
new file mode 100644
index 000000000000..9830837aef96
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/ProxyResource.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.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
+ ///
+ public partial class ProxyResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ProxyResource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.Resource(json);
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Resource.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/Resource.PowerShell.cs
new file mode 100644
index 000000000000..280bd75ea2c3
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Resource.PowerShell.cs
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial class Resource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.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.SelfHelp.Models.Api30.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Resource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Resource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial interface IResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Resource.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/Resource.TypeConverter.cs
new file mode 100644
index 000000000000..216bb0208662
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/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.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.IResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Resource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Resource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Resource.cs b/src/SelfHelp/generated/api/Models/Api30/Resource.cs
new file mode 100644
index 000000000000..3dc6bd2d68ce
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Resource.cs
@@ -0,0 +1,208 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Common fields that are returned in the response for all Azure Resource Manager resources
+ ///
+ public partial class Resource :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemData()); set { {_systemData = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData _systemData;
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemData()); }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); }
+
+ /// 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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.IJsonSerializable
+ {
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the resource",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource creation (UTC).",
+ SerializedName = @"createdAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that created the resource.",
+ SerializedName = @"createdBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that created the resource.",
+ SerializedName = @"createdByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource last modification (UTC)",
+ SerializedName = @"lastModifiedAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? SystemDataLastModifiedAt { get; set; }
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that last modified the resource.",
+ SerializedName = @"lastModifiedBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that last modified the resource.",
+ SerializedName = @"lastModifiedByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; }
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData SystemData { get; set; }
+ /// The timestamp of resource creation (UTC).
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The timestamp of resource last modification (UTC)
+ global::System.DateTime? SystemDataLastModifiedAt { get; set; }
+ /// The identity that last modified the resource.
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/Resource.json.cs b/src/SelfHelp/generated/api/Models/Api30/Resource.json.cs
new file mode 100644
index 000000000000..53237e5382e4
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/Resource.json.cs
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Resource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/SystemData.PowerShell.cs b/src/SelfHelp/generated/api/Models/Api30/SystemData.PowerShell.cs
new file mode 100644
index 000000000000..e2b63d4e1db6
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/SystemData.PowerShell.cs
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))]
+ public partial class SystemData
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new SystemData(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new SystemData(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal SystemData(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("LastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal SystemData(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("LastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))]
+ public partial interface ISystemData
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/SystemData.TypeConverter.cs b/src/SelfHelp/generated/api/Models/Api30/SystemData.TypeConverter.cs
new file mode 100644
index 000000000000..9c75f3328543
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/SystemData.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api30.ISystemData ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return SystemData.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return SystemData.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/SystemData.cs b/src/SelfHelp/generated/api/Models/Api30/SystemData.cs
new file mode 100644
index 000000000000..044101ee030d
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/SystemData.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class SystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemDataInternal
+ {
+
+ /// Backing field for property.
+ private global::System.DateTime? _createdAt;
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; }
+
+ /// Backing field for property.
+ private string _createdBy;
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string CreatedBy { get => this._createdBy; set => this._createdBy = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? _createdByType;
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _lastModifiedAt;
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; }
+
+ /// Backing field for property.
+ private string _lastModifiedBy;
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? _lastModifiedByType;
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; }
+
+ /// Creates an new instance.
+ public SystemData()
+ {
+
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial interface ISystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource creation (UTC).",
+ SerializedName = @"createdAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? CreatedAt { get; set; }
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that created the resource.",
+ SerializedName = @"createdBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string CreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that created the resource.",
+ SerializedName = @"createdByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? CreatedByType { get; set; }
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource last modification (UTC)",
+ SerializedName = @"lastModifiedAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? LastModifiedAt { get; set; }
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that last modified the resource.",
+ SerializedName = @"lastModifiedBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string LastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that last modified the resource.",
+ SerializedName = @"lastModifiedByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? LastModifiedByType { get; set; }
+
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ internal partial interface ISystemDataInternal
+
+ {
+ /// The timestamp of resource creation (UTC).
+ global::System.DateTime? CreatedAt { get; set; }
+ /// The identity that created the resource.
+ string CreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? CreatedByType { get; set; }
+ /// The timestamp of resource last modification (UTC)
+ global::System.DateTime? LastModifiedAt { get; set; }
+ /// The identity that last modified the resource.
+ string LastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? LastModifiedByType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/Api30/SystemData.json.cs b/src/SelfHelp/generated/api/Models/Api30/SystemData.json.cs
new file mode 100644
index 000000000000..99620bc13075
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/Api30/SystemData.json.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class SystemData
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SystemData(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;}
+ {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;}
+ {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;}
+ {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;}
+ {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;}
+ {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add );
+ AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add );
+ AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add );
+ AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add );
+ AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add );
+ AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/SelfHelpIdentity.PowerShell.cs b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.PowerShell.cs
new file mode 100644
index 000000000000..8410c8059f2a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.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.SelfHelp.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(SelfHelpIdentityTypeConverter))]
+ public partial class SelfHelpIdentity
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new SelfHelpIdentity(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.SelfHelp.Models.ISelfHelpIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new SelfHelpIdentity(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.SelfHelp.Models.ISelfHelpIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal SelfHelpIdentity(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Scope"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Scope, global::System.Convert.ToString);
+ }
+ if (content.Contains("DiagnosticsResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).DiagnosticsResourceName = (string) content.GetValueForProperty("DiagnosticsResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).DiagnosticsResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)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 SelfHelpIdentity(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Scope"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Scope, global::System.Convert.ToString);
+ }
+ if (content.Contains("DiagnosticsResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).DiagnosticsResourceName = (string) content.GetValueForProperty("DiagnosticsResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).DiagnosticsResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).Id, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(SelfHelpIdentityTypeConverter))]
+ public partial interface ISelfHelpIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/SelfHelpIdentity.TypeConverter.cs b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..05a7ee79237a
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.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.SelfHelp.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class SelfHelpIdentityTypeConverter : 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.SelfHelp.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.ISelfHelpIdentity 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 SelfHelpIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return SelfHelpIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return SelfHelpIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return SelfHelpIdentity.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/SelfHelpIdentity.cs b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.cs
new file mode 100644
index 000000000000..26eb8dc15c46
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ public partial class SelfHelpIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _diagnosticsResourceName;
+
+ /// Unique resource name for insight resources
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string DiagnosticsResourceName { get => this._diagnosticsResourceName; set => this._diagnosticsResourceName = value; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _scope;
+
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)]
+ public string Scope { get => this._scope; set => this._scope = value; }
+
+ /// Creates an new instance.
+ public SelfHelpIdentity()
+ {
+
+ }
+ }
+ public partial interface ISelfHelpIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable
+ {
+ /// Unique resource name for insight resources
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Unique resource name for insight resources",
+ SerializedName = @"diagnosticsResourceName",
+ PossibleTypes = new [] { typeof(string) })]
+ string DiagnosticsResourceName { get; set; }
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"This is an extension resource provider and only resource level extension is supported at the moment.",
+ SerializedName = @"scope",
+ PossibleTypes = new [] { typeof(string) })]
+ string Scope { get; set; }
+
+ }
+ internal partial interface ISelfHelpIdentityInternal
+
+ {
+ /// Unique resource name for insight resources
+ string DiagnosticsResourceName { get; set; }
+ /// Resource identity path
+ string Id { get; set; }
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ ///
+ string Scope { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/Models/SelfHelpIdentity.json.cs b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.json.cs
new file mode 100644
index 000000000000..9d8e096e8184
--- /dev/null
+++ b/src/SelfHelp/generated/api/Models/SelfHelpIdentity.json.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ public partial class SelfHelpIdentity
+ {
+
+ ///
+ /// 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SelfHelpIdentity(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject instance to deserialize from.
+ internal SelfHelpIdentity(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope;}
+ {_diagnosticsResourceName = If( json?.PropertyT("diagnosticsResourceName"), out var __jsonDiagnosticsResourceName) ? (string)__jsonDiagnosticsResourceName : (string)DiagnosticsResourceName;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope" ,container.Add );
+ AddIf( null != (((object)this._diagnosticsResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._diagnosticsResourceName.ToString()) : null, "diagnosticsResourceName" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SelfHelp/generated/api/SelfHelp.cs b/src/SelfHelp/generated/api/SelfHelp.cs
new file mode 100644
index 000000000000..d986554fef3f
--- /dev/null
+++ b/src/SelfHelp/generated/api/SelfHelp.cs
@@ -0,0 +1,970 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the SelfHelp service.
+ /// Help RP provider
+ ///
+ public partial class SelfHelp
+ {
+
+ ///
+ /// This API is used to check the uniqueness of a resource name used for a diagnostic check.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// The required parameters for availability check.
+ /// 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.SelfHelp.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 DiagnosticsCheckNameAvailability(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (scope)
+ + "/providers/Microsoft.Help/checkNameAvailability"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// This API is used to check the uniqueness of a resource name used for a diagnostic check.
+ ///
+ ///
+ /// The required parameters for availability check.
+ /// 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.SelfHelp.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 DiagnosticsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/checkNameAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/checkNameAvailability'");
+ }
+
+ // replace URI parameters with values from identity
+ var scope = _match.Groups["scope"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + scope
+ + "/providers/Microsoft.Help/checkNameAvailability"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsCheckNameAvailability_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.SelfHelp.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 DiagnosticsCheckNameAvailability_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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// The required parameters for availability check.
+ /// 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 DiagnosticsCheckNameAvailability_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(scope),scope);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ ///
+ /// Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover
+ /// and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from
+ /// Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions
+ /// Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Unique resource name for insight resources
+ /// The required request body for this insightResource invocation.
+ /// 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.SelfHelp.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 DiagnosticsCreate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (scope)
+ + "/providers/Microsoft.Help/diagnostics/"
+ + global::System.Uri.EscapeDataString(diagnosticsResourceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsCreate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover
+ /// and identify the relevant solution for your Azure issue.
You can create diagnostics using the ‘solutionId’ from
+ /// Solution Discovery API response and ‘additionalParameters’
Note: ‘requiredParameterSets’ from Solutions
+ /// Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API
+ ///
+ ///
+ /// The required request body for this insightResource invocation.
+ /// 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.SelfHelp.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 DiagnosticsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/diagnostics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var scope = _match.Groups["scope"].Value;
+ var diagnosticsResourceName = _match.Groups["diagnosticsResourceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + scope
+ + "/providers/Microsoft.Help/diagnostics/"
+ + diagnosticsResourceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsCreate_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.SelfHelp.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 DiagnosticsCreate_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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Unique resource name for insight resources
+ /// The required request body for this insightResource invocation.
+ /// 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 DiagnosticsCreate_Validate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(scope),scope);
+ await eventListener.AssertNotNull(nameof(diagnosticsResourceName),diagnosticsResourceName);
+ await eventListener.AssertMinimumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,1);
+ await eventListener.AssertMaximumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,100);
+ await eventListener.AssertRegEx(nameof(diagnosticsResourceName),diagnosticsResourceName,@"^[A-Za-z0-9-+@()_]+$");
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ ///
+ /// Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Unique resource name for insight resources
+ /// 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.SelfHelp.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 DiagnosticsGet(string scope, string diagnosticsResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (scope)
+ + "/providers/Microsoft.Help/diagnostics/"
+ + global::System.Uri.EscapeDataString(diagnosticsResourceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
+ ///
+ ///
+ /// 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.SelfHelp.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 DiagnosticsGetViaIdentity(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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/diagnostics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var scope = _match.Groups["scope"].Value;
+ var diagnosticsResourceName = _match.Groups["diagnosticsResourceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + scope
+ + "/providers/Microsoft.Help/diagnostics/"
+ + diagnosticsResourceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiagnosticsGet_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.SelfHelp.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 DiagnosticsGet_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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Unique resource name for insight resources
+ /// 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 DiagnosticsGet_Validate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(scope),scope);
+ await eventListener.AssertNotNull(nameof(diagnosticsResourceName),diagnosticsResourceName);
+ await eventListener.AssertMinimumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,1);
+ await eventListener.AssertMaximumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,100);
+ await eventListener.AssertRegEx(nameof(diagnosticsResourceName),diagnosticsResourceName,@"^[A-Za-z0-9-+@()_]+$");
+ }
+ }
+
+ ///
+ /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for
+ /// your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We
+ /// will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s)
+ /// using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
+ /// Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’
+ /// as an input to Diagnostics API.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and
+ /// 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId
+ /// eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.
+ /// Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ /// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting
+ /// point to use for subsequent calls.
+ /// 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.SelfHelp.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 DiscoverySolutionList(string scope, string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + (scope)
+ + "/providers/Microsoft.Help/discoverySolutions"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + (Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiscoverySolutionList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for
+ /// your Azure issue.
You can discover solutions using resourceUri OR resourceUri + problemClassificationId.
We
+ /// will do our best in returning relevant diagnostics for your Azure issue.
Get the problemClassificationId(s)
+ /// using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).
+ /// Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’
+ /// as an input to Diagnostics API.
+ ///
+ ///
+ /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and
+ /// 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId
+ /// eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.
+ /// Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ /// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting
+ /// point to use for subsequent calls.
+ /// 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.SelfHelp.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 DiscoverySolutionListViaIdentity(global::System.String viaIdentity, string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/discoverySolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/discoverySolutions'");
+ }
+
+ // replace URI parameters with values from identity
+ var scope = _match.Groups["scope"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/"
+ + scope
+ + "/providers/Microsoft.Help/discoverySolutions"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ + "&"
+ + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + (Filter))
+ + "&"
+ + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken))
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DiscoverySolutionList_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.SelfHelp.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 DiscoverySolutionList_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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230601.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.
+ ///
+ /// This is an extension resource provider and only resource level extension is supported at the moment.
+ /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and
+ /// 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId
+ /// eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.
+ /// Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ /// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting
+ /// point to use for subsequent calls.
+ /// 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 DiscoverySolutionList_Validate(string scope, string Filter, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(scope),scope);
+ await eventListener.AssertNotNull(nameof(Filter),Filter);
+ await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken);
+ }
+ }
+
+ /// Returns list of operations.
+ /// 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.Help/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Returns list of operations.
+ ///
+ /// 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2023-06-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.Help/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for