diff --git a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml index ff5be938c411..0f63c373e470 100644 --- a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml +++ b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml @@ -14,9 +14,18 @@ + + + + + + + + + @@ -30,9 +39,18 @@ Scope + + SimplifiedSolutionsResourceName + + + SolutionId + SolutionResourceName + + SubscriptionId + TroubleshooterName @@ -376,15 +394,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult + + + + + + @@ -392,15 +416,21 @@ Result + + Status + + + Version + - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.CheckNameAvailabilityResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.CheckNameAvailabilityResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse @@ -432,9 +462,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ContinueRequestBody + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ContinueRequestBody + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService + + + + + + + + + + + + + + + + + + DisplayName + + + ResourceType + + + ServiceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody @@ -454,9 +518,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic @@ -482,9 +546,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocation - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocation @@ -504,9 +568,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters @@ -526,9 +590,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource @@ -590,9 +654,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties @@ -618,9 +682,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters @@ -640,9 +704,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiscoveryResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiscoveryResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest + + + + + + + + + + + + + + + + + + + + + AdditionalContext + + + IssueSummary + + + ResourceId + + + ServiceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse @@ -662,9 +766,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error @@ -690,9 +794,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Filter + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Filter + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter @@ -724,9 +828,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Insight + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Insight + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight @@ -758,9 +862,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChart + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChart + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart @@ -804,9 +908,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseOption + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions + + + + + + + + + + + + + + + + + + + + + ProblemClassificationId + + + ProblemDescription + + + ProblemTitle + + + ServiceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseOption + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption @@ -832,9 +976,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties @@ -850,6 +994,9 @@ + + + @@ -866,15 +1013,18 @@ ValidationErrorMessage + + ValidationScope + - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.RestartTroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.RestartTroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse @@ -900,9 +1050,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SearchResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SearchResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult @@ -964,9 +1114,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section + + + + + + + + + + + + + + + Content + + + Title + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp @@ -992,9 +1170,157 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties + + + + + + + + + + + + + + + + + + + + + Content + + + ProvisioningState + + + SolutionId + + + Title + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties @@ -1032,9 +1358,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResource @@ -1090,18 +1416,94 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource - + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource + + + + + + + + + + + + + + + + + + + + + + + + @@ -1110,10 +1512,28 @@ - Location + Name - Name + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location ResourceGroupName @@ -1124,9 +1544,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties @@ -1164,9 +1584,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters @@ -1186,12 +1606,79 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceSelfHelp - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceSelfHelp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic + + + + + + @@ -1211,6 +1698,9 @@ + + EstimatedCompletionTime + ReplacementKey @@ -1232,9 +1722,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshooters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp + + + + + + + + + + + + + + + + + + Content + + + SolutionId + + + Title + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshooters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters @@ -1266,9 +1790,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Step + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Step + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step @@ -1318,9 +1864,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepInput + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepInput + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput @@ -1333,6 +1879,9 @@ + + + @@ -1358,6 +1907,9 @@ QuestionId + + QuestionTitle + QuestionType @@ -1376,9 +1928,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterion + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterion + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion @@ -1404,9 +1956,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstanceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstanceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties @@ -1432,9 +1984,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters @@ -1454,9 +2006,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource @@ -1518,9 +2070,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse @@ -1552,9 +2104,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Video + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Video + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video @@ -1586,9 +2138,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroup + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroup + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup @@ -1608,9 +2160,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo @@ -1636,9 +2188,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult diff --git a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 index abbbd3ffba0c..5114f71871d7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 +++ b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 @@ -1,142 +1,24 @@ -# -# Module manifest for module 'Az.SelfHelp' -# -# Generated by: Microsoft Corporation -# -# Generated on: 11/10/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.SelfHelp.psm1' - -# Version number of this module. -ModuleVersion = '0.1.1' - -# 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.13.2'; }) - -# 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', - 'Get-AzSelfHelpSolution', 'Get-AzSelfHelpTroubleshooter', - 'Invoke-AzSelfHelpCheckNameAvailability', - 'Invoke-AzSelfHelpContinueTroubleshooter', - 'New-AzSelfHelpDiagnostic', 'New-AzSelfHelpSolution', - 'New-AzSelfHelpTroubleshooter', 'Restart-AzSelfHelpTroubleshooter', - 'Stop-AzSelfHelpTroubleshooter', 'Update-AzSelfHelpSolution' - -# 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 = @{ - + GUID = '2705ffd2-39d8-491f-b0c6-14fca2dc3727' + RootModule = './Az.SelfHelp.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: SelfHelp cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.SelfHelp.private.dll' + FormatsToProcess = './Az.SelfHelp.format.ps1xml' + FunctionsToExport = 'Get-AzSelfHelpDiagnostic', 'Get-AzSelfHelpDiscoverySolution', 'Get-AzSelfHelpSimplifiedSolution', 'Get-AzSelfHelpSolution', 'Get-AzSelfHelpSolutionSelfHelp', 'Get-AzSelfHelpTroubleshooter', 'Invoke-AzSelfHelpCheckNameAvailability', 'Invoke-AzSelfHelpContinueTroubleshooter', 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope', 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope', 'Invoke-AzSelfHelpWarmSolutionUp', 'New-AzSelfHelpDiagnostic', 'New-AzSelfHelpSimplifiedSolution', 'New-AzSelfHelpSolution', 'New-AzSelfHelpTroubleshooter', 'Restart-AzSelfHelpTroubleshooter', 'Stop-AzSelfHelpTroubleshooter', 'Update-AzSelfHelpSolution', '*' + AliasesToExport = '*' + 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 = '* Added support for discovery API as the first point of entry in Help RP. -* Added support for new solution types (Diagnostics, Azure Solutions, Troubleshooters) in preview -* Enabled customers to access Azure curated, relevant self-help solutions including diagnostics and Azure solutions at the resource and subscription scopes. -* Implemented filter parameters such as solutionType, problemClassificationId/problemId, resourceId, and resourceType to enable customers to get more granular results through discovery API. -* Enabled customers to trigger one or more applicable solutions such as diagnostics, components within Azure solutions, and Troubleshooters' - - # 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 = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SelfHelp' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psm1 b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psm1 index 7dca99691941..8ae10975f279 100644 --- a/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psm1 +++ b/src/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psm1 @@ -47,37 +47,41 @@ # Ask for the shared functionality table $VTable = Register-AzModule - + # Tweaks the pipeline on module load $instance.OnModuleLoad = $VTable.OnModuleLoad # Following two delegates are added for telemetry $instance.GetTelemetryId = $VTable.GetTelemetryId $instance.Telemetry = $VTable.Telemetry - + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo # Tweaks the pipeline per call $instance.OnNewRequest = $VTable.OnNewRequest - + # Gets shared parameter values $instance.GetParameterValue = $VTable.GetParameterValue - + # Allows shared module to listen to events from this module $instance.EventListener = $VTable.EventListener - + # Gets shared argument completers $instance.ArgumentCompleter = $VTable.ArgumentCompleter - + # The name of the currently selected Azure profile $instance.ProfileName = $VTable.ProfileName - # Load the custom module $customModulePath = Join-Path $PSScriptRoot './custom/Az.SelfHelp.custom.psm1' if(Test-Path $customModulePath) { $null = Import-Module -Name $customModulePath } - + # Export nothing to clear implicit exports Export-ModuleMember @@ -97,12 +101,12 @@ # 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 diff --git a/src/SelfHelp/SelfHelp.Autorest/README.md b/src/SelfHelp/SelfHelp.Autorest/README.md index 96a764bcb608..75899e66513f 100644 --- a/src/SelfHelp/SelfHelp.Autorest/README.md +++ b/src/SelfHelp/SelfHelp.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the SelfHelp service. --- - ## Info - Modifiable: yes - Generated: all @@ -30,10 +29,10 @@ For information on how to develop for `Az.SelfHelp`, see [how-to.md](how-to.md). ```yaml # pin the swagger version by using the commit id instead of branch name -branch: 270eeb7a7883e0ad4e183e809fb67c6551d0eaa0 +commit: 1145a0df0f91b5f0f1f5ab66667899a61eda5e2b require: # readme.azure.noprofile.md is the common configuration file - - $(this-folder)/../readme.azure.noprofile.md + - $(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 @@ -53,6 +52,10 @@ subject-prefix: $(service-name) resourcegroup-append: true nested-object-to-string: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: # Following is two common directive which are normally required in all the RPs # 1. Remove the unexpanded parameter set diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/diagnostics.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/diagnostics.json index e24c39f50595..74d3bb6ab8ba 100644 --- a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/diagnostics.json +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/diagnostics.json @@ -1,6 +1,6 @@ { "resourceType": "diagnostics", - "apiVersion": "2023-09-01-preview", + "apiVersion": "2024-03-01-preview", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.selfhelp" }, diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/selfHelp.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/selfHelp.json new file mode 100644 index 000000000000..a4a8b6239a3b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/selfHelp.json @@ -0,0 +1,37 @@ +{ + "resourceType": "selfHelp", + "apiVersion": "2024-03-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.selfhelp" + }, + "commands": [ + { + "name": "Get-AzSelfHelpSolutionSelfHelp", + "description": "Finds and Executes a Self Help Solution based on the Solution Id.\nThese are static self help content to help users troubleshoot their issues.", + "path": "/providers/Microsoft.Help/selfHelp/{solutionId}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp" + }, + "parameterSets": [ + { + "parameters": [ + "-SolutionId " + ] + } + ] + }, + "examples": [ + { + "description": "Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot their issues.", + "parameters": [ + { + "name": "-SolutionId", + "value": "[Path.solutionId]" + } + ] + } + ] + } + ] +} diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/simplifiedSolutions.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/simplifiedSolutions.json new file mode 100644 index 000000000000..7ebb983d5cdf --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/simplifiedSolutions.json @@ -0,0 +1,42 @@ +{ + "resourceType": "simplifiedSolutions", + "apiVersion": "2024-03-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.selfhelp" + }, + "commands": [ + { + "name": "Get-AzSelfHelpSimplifiedSolution", + "description": "Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.", + "path": "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution" + }, + "parameterSets": [ + { + "parameters": [ + "-SResourceName ", + "-Scope " + ] + } + ] + }, + "examples": [ + { + "description": "Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.", + "parameters": [ + { + "name": "-SResourceName", + "value": "[Path.simplifiedSolutionsResourceName]" + }, + { + "name": "-Scope", + "value": "[Path.scope]" + } + ] + } + ] + } + ] +} diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json index 832b5dac9d8d..467168dd47ab 100644 --- a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json @@ -1,6 +1,6 @@ { "resourceType": "solutions", - "apiVersion": "2023-09-01-preview", + "apiVersion": "2024-03-01-preview", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.selfhelp" }, @@ -37,6 +37,39 @@ ] } ] + }, + { + "name": "Invoke-AzSelfHelpWarmSolutionUp", + "description": "Warm up the solution resource by preloading asynchronous diagnostics results into cache", + "path": "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup" + }, + "parameterSets": [ + { + "parameters": [ + "-Scope ", + "-SolutionResourceName " + ] + } + ] + }, + "examples": [ + { + "description": "Warm up the solution resource by preloading asynchronous diagnostics results into cache", + "parameters": [ + { + "name": "-Scope", + "value": "[Path.scope]" + }, + { + "name": "-SolutionResourceName", + "value": "[Path.solutionResourceName]" + } + ] + } + ] } ] } diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json index e08bd0b5d594..d97c2a006635 100644 --- a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json @@ -1,6 +1,6 @@ { "resourceType": "troubleshooters", - "apiVersion": "2023-09-01-preview", + "apiVersion": "2024-03-01-preview", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.selfhelp" }, diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpDiscoverySolution.md index 5a8990ae4919..0ed9b409fa91 100644 --- a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpDiscoverySolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpDiscoverySolution.md @@ -1,7 +1,7 @@ ### 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" -Filter "problemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'" +Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" ``` ```output diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..2ee2d19bb4b3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,16 @@ +### Example 1: Get Simplified Solutions +```powershell +$resourceName = "sampleRName" + +Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName aits-data-inestion +``` + +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + + diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolution.md index e7a62089d0cc..a88402ab74c9 100644 --- a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolution.md @@ -1,12 +1,12 @@ ### Example 1: Get-AzSelfHelpSolution by resource id ```powershell -Get-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/testkv/testDB +Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRG +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Get SelfHelp Solution by resource id \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolutionSelfHelp.md b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolutionSelfHelp.md new file mode 100644 index 000000000000..43b086cfaabd --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Get-AzSelfHelpSolutionSelfHelp.md @@ -0,0 +1,12 @@ +### Example 1: Get Self Help Solutions for a given solutionId +```powershell +Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +apollo-48996ff7-002f-47c1-85b2-df138843d5d5 +``` + +Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video tutorials, links and guides to public documentation related to a specific problem that enables users to troubleshoot Azure issues. diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md new file mode 100644 index 000000000000..e3a0360f25b1 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md @@ -0,0 +1,11 @@ +### Example 1: Discover Solution using natural language at subscription scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. + diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md new file mode 100644 index 000000000000..ee4eac47d321 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md @@ -0,0 +1,11 @@ +### Example 1: Discover Solution using natural language at tenant scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpWarmSolutionUp.md b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpWarmSolutionUp.md new file mode 100644 index 000000000000..46ad661d2088 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Invoke-AzSelfHelpWarmSolutionUp.md @@ -0,0 +1,16 @@ +### Example 1: Warm up the solution resource +```powershell +$resourceName = "sampleRName" +$parameters = [ordered]@{ + "ProductId" = "13491" +} +Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters +``` + +```output +[No output] +``` + +Warm up the solution resource by preloading asynchronous diagnostics results into cache + + diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..f0081c34efaa --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,21 @@ +### Example 1: Create a new simplified solution for a resource +```powershell +$resourceName = "sampleRName" +$solutionId = "9004345-7759" +$parameters = [ordered]@{ + + "SearchText" = "Billing" +} +New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName + +``` + +Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + + diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSolution.md index 9bb1c92d8dcc..781d6d5f2253 100644 --- a/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/examples/New-AzSelfHelpSolution.md @@ -1,20 +1,21 @@ ### Example 1: Create New SelfHelp Solution ```powershell -$criteria = [ordered]@{ - "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" -} -$parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" -} -New-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/kv/testDB -Parameter $parameters -TriggerCriterion $criteria +$criteria = [ordered]@{ + "name" ="SolutionId" + "value" = "apollo-cognitve-search-custom-skill" +} + +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} + +New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRg +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Creates a SelfHelp Solution for a resource. \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/examples/Update-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/examples/Update-AzSelfHelpSolution.md index 2836e7b0204c..ecd983cc5d73 100644 --- a/src/SelfHelp/SelfHelp.Autorest/examples/Update-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/examples/Update-AzSelfHelpSolution.md @@ -1,20 +1,19 @@ ### Example 1: Update the Solution Resource ```powershell $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } $criteria = [ordered]@{ "name" =" ReplacementKey" "value" = "" } -Update-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRg +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Updates the requiredInputs or additional information needed to execute the solution \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 index 69b7cd8389b8..e27c94e65f26 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 @@ -25,7 +25,7 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES @@ -34,14 +34,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic #> function Get-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -54,7 +57,7 @@ param( [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 index 7910a1066860..4f4fa428d851 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 @@ -17,34 +17,28 @@ <# .Synopsis Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +

Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. .Description Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +

Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. .Example - Get-AzSelfHelpDiscoverySolution -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -Filter "problemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'" +Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution #> function Get-AzSelfHelpDiscoverySolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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] - # 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. + # 'ProblemClassificationId' is a mandatory filter to get solutions ids. # It also supports optional 'ResourceType' and 'SolutionType' filters. - # The filter supports only 'and', 'or' and 'eq' operators. + # The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. # Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' ${Filter}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 new file mode 100644 index 000000000000..8f70816bb6f1 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 @@ -0,0 +1,198 @@ + +# ---------------------------------------------------------------------------------- +# 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 simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. +.Description +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. +.Example +$resourceName = "sampleRName" + +Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +.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 ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution +#> +function Get-AzSelfHelpSimplifiedSolution { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SimplifiedSolutionsResourceName')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Simplified Solutions Resource Name. + ${SResourceName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${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-AzSelfHelpSimplifiedSolution_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSimplifiedSolution_GetViaIdentity'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 index 1916650e45fe..f9c345981870 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 @@ -20,12 +20,12 @@ Get the solution using the applicable solutionResourceName while creating the so .Description Get the solution using the applicable solutionResourceName while creating the solution. .Example -Get-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/testkv/testDB +Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -34,14 +34,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution #> function Get-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -54,7 +57,7 @@ param( [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 new file mode 100644 index 000000000000..d43058c97c3d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 @@ -0,0 +1,192 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. +.Description +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. +.Example +Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp +.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 ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp +#> +function Get-AzSelfHelpSolutionSelfHelp { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # SolutionId is a unique id to identify a solution. + # You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + ${SolutionId}, + + [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-AzSelfHelpSolutionSelfHelp_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSolutionSelfHelp_GetViaIdentity'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 index a93c419f7e64..dff25b201e04 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 @@ -27,7 +27,7 @@ Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource .Notes COMPLEX PARAMETER PROPERTIES @@ -36,14 +36,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter #> function Get-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -56,7 +59,7 @@ param( [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 index c13fe8f1fe4d..858cbb1271b1 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 @@ -32,7 +32,7 @@ Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityR .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -45,21 +45,24 @@ CHECKNAMEAVAILABILITYREQUEST : The check availabi 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability #> function Invoke-AzSelfHelpCheckNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Post', Mandatory)] [Parameter(ParameterSetName='PostExpanded', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 index eb66d5d18547..6a1093de1e09 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 @@ -31,7 +31,7 @@ $continueRequest = [ordered]@{ Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs @@ -44,20 +44,23 @@ To create the parameters described below, construct a hash table containing the CONTINUEREQUESTBODY : Troubleshooter ContinueRequest body. [Response ]: [QuestionId ]: id of the question. - [QuestionType ]: Text Input. Will be a single line input. + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text [StepId ]: Unique id of the result. 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. RESPONSE : . [QuestionId ]: id of the question. - [QuestionType ]: Text Input. Will be a single line input. + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter @@ -70,7 +73,7 @@ param( [Parameter(ParameterSetName='ContinueExpanded', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='Continue', Mandatory)] @@ -91,7 +94,7 @@ param( [Parameter(ParameterSetName='Continue', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody] # Troubleshooter ContinueRequest body. # To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ${ContinueRequestBody}, @@ -100,7 +103,7 @@ param( [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]] # . # To construct, see NOTES section for RESPONSE properties and create a hash table. ${Response}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 new file mode 100644 index 000000000000..782b65b93339 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 @@ -0,0 +1,249 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Solution discovery using natural language processing. +.Description +Solution discovery using natural language processing. +.Example +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +.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. + +DISCOVERSOLUTIONREQUEST : Discover NLP request. + [AdditionalContext ]: Additional information in the form of a string. + [IssueSummary ]: Describe the issue with the affected resource. + [ResourceId ]: Provide resourceId of affected resource + [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope +#> +function Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post')] + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', 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='Post', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + # Discover NLP request. + # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + ${DiscoverSolutionRequest}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Additional information in the form of a string. + ${AdditionalContext}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Describe the issue with the affected resource. + ${IssueSummary}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Provide resourceId of affected resource + ${ResourceId}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Service Classification id for the resource. + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + ${ServiceId}, + + [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 = @{ + Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post'; + PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded'; + PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity'; + PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded'; + } + if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 new file mode 100644 index 000000000000..8c6b809ce22c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 @@ -0,0 +1,204 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Solution discovery using natural language processing. +.Description +Solution discovery using natural language processing. +.Example +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +.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. + +DISCOVERSOLUTIONREQUEST : Discover NLP request. + [AdditionalContext ]: Additional information in the form of a string. + [IssueSummary ]: Describe the issue with the affected resource. + [ResourceId ]: Provide resourceId of affected resource + [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope +#> +function Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + # Discover NLP request. + # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + ${DiscoverSolutionRequest}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Additional information in the form of a string. + ${AdditionalContext}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Describe the issue with the affected resource. + ${IssueSummary}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Provide resourceId of affected resource + ${ResourceId}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Service Classification id for the resource. + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + ${ServiceId}, + + [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 = @{ + Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_Post'; + PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 new file mode 100644 index 000000000000..35e094517f49 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Warm up the solution resource by preloading asynchronous diagnostics results into cache +.Description +Warm up the solution resource by preloading asynchronous diagnostics results into cache +.Example +$resourceName = "sampleRName" +$parameters = [ordered]@{ + "ProductId" = "13491" +} +Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + +SOLUTIONWARMUPREQUESTBODY : Solution WarmUpRequest body + [Parameter ]: Dictionary of + [(Any) ]: This indicates any property can be added to this object. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup +#> +function Invoke-AzSelfHelpWarmSolutionUp { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='WarmExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Warm', Mandatory)] + [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, + + [Parameter(ParameterSetName='Warm', Mandatory)] + [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Solution resource Name. + ${SolutionResourceName}, + + [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='WarmViaIdentityExpanded', 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='Warm', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody] + # Solution WarmUpRequest body + # To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. + ${SolutionWarmUpRequestBody}, + + [Parameter(ParameterSetName='WarmExpanded')] + [Parameter(ParameterSetName='WarmViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters]))] + [System.Collections.Hashtable] + # Dictionary of + ${Parameter}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [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 = @{ + Warm = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_Warm'; + WarmExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmExpanded'; + WarmViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentity'; + WarmViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 index f7c493e3c839..85467964f833 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 @@ -17,14 +17,10 @@ <# .Synopsis Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -

Note: requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Description Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -

Note: requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Example $insightsToInvoke = [ordered]@{ "solutionId" = "Demo2InsightV2" @@ -32,7 +28,7 @@ $insightsToInvoke = [ordered]@{ 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.Api20230901Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +42,7 @@ INSIGHT : SolutionIds that are needed to be invoked. https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic #> function New-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -59,20 +55,20 @@ 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters]))] [System.Collections.Hashtable] - # Global parameters that can be passed to all solutionIds. + # Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results ${GlobalParameter}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]] # SolutionIds that are needed to be invoked. # To construct, see NOTES section for INSIGHT properties and create a hash table. ${Insight}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 new file mode 100644 index 000000000000..4d7fc14a720b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 @@ -0,0 +1,211 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +

Note:
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +
+.Description +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +

Note:
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +
+.Example +$resourceName = "sampleRName" +$solutionId = "9004345-7759" +$parameters = [ordered]@{ + + "SearchText" = "Billing" +} +New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution +#> +function New-AzSelfHelpSimplifiedSolution { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('SimplifiedSolutionsResourceName')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Simplified Solutions Resource Name. + ${SResourceName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters]))] + [System.Collections.Hashtable] + # Client input parameters to run Simplified Solutions + ${Parameter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Solution Id to identify single Simplified Solution. + ${SolutionId}, + + [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-AzSelfHelpSimplifiedSolution_CreateExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 index faf768c51894..f0bada7812b6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 @@ -16,8 +16,10 @@ <# .Synopsis -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. @@ -26,8 +28,10 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Description -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. @@ -36,123 +40,24 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Example -$criteria = [ordered]@{ - "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" -} -$parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" -} -New-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/kv/testDB -Parameter $parameters -TriggerCriterion $criteria +$criteria = [ordered]@{ + "name" ="SolutionId" + "value" = "apollo-cognitve-search-custom-skill" +} + +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} + +New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource .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. -REPLACEMENTMAPDIAGNOSTIC : Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - -REPLACEMENTMAPMETRICSBASEDCHART : Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - -REPLACEMENTMAPTROUBLESHOOTER : Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - -REPLACEMENTMAPVIDEO : Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - -REPLACEMENTMAPVIDEOGROUP : Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - -REPLACEMENTMAPWEBRESULT : Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - -SECTION : List of section object. - [Content ]: Solution sections content. - [ReplacementMapDiagnostic ]: Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - [ReplacementMapMetricsBasedChart ]: Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - [ReplacementMapTroubleshooter ]: Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - [ReplacementMapVideo ]: Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [ReplacementMapVideoGroup ]: Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementMapWebResult ]: Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - [Title ]: Solution sections title. - TRIGGERCRITERION : Solution request trigger criteria [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. @@ -160,7 +65,7 @@ TRIGGERCRITERION : Solution request trigger criteria https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution #> function New-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -173,101 +78,20 @@ 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The HTML content that needs to be rendered and shown to customer. - ${Content}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState])] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState] - # Status of solution provisioning. - ${ProvisioningState}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]] - # Solution diagnostics results. - # To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. - ${ReplacementMapDiagnostic}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]] - # Solution metrics based charts - # To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - ${ReplacementMapMetricsBasedChart}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]] - # Solutions Troubleshooters - # To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - ${ReplacementMapTroubleshooter}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]] - # Video solutions, which have the power to engage the customer by stimulating their senses - # To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. - ${ReplacementMapVideo}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]] - # Group of Videos - # To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - ${ReplacementMapVideoGroup}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]] - # Solution AzureKB results - # To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - ${ReplacementMapWebResult}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]] - # List of section object. - # To construct, see NOTES section for SECTION properties and create a hash table. - ${Section}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # Solution Id to identify single solution. - ${SolutionId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The title. - ${Title}, - [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] # Solution request trigger criteria # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 index 7bb700f80489..4e283c4ad623 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 @@ -17,18 +17,16 @@ <# .Synopsis Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE API. -

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Description Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE API. -

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Example $parameters = [ordered]@{ "addParam1"= "/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6" @@ -38,12 +36,12 @@ New-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a 6af-43e1-96d3-bf71f6f5f8ba" -Name "12d59989-f8a9-4b69-9919-1ef51df4eff6" -Parameter $parameters -SolutionId "e104dbdf-9e14-4c9f-bc78-21ac90382231" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter #> function New-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -56,12 +54,12 @@ 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Troubleshooter Resource ${Parameter}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 index ee503639b29a..4454294a7ee2 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -25,7 +25,7 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES @@ -34,14 +34,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic #> function Get-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -54,7 +57,7 @@ param( [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -195,34 +198,28 @@ end { <# .Synopsis Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +

Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. .Description Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +

Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. .Example - Get-AzSelfHelpDiscoverySolution -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -Filter "problemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'" +Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution #> function Get-AzSelfHelpDiscoverySolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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] - # 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. + # 'ProblemClassificationId' is a mandatory filter to get solutions ids. # It also supports optional 'ResourceType' and 'SolutionType' filters. - # The filter supports only 'and', 'or' and 'eq' operators. + # The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. # Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' ${Filter}, @@ -361,16 +358,18 @@ end { <# .Synopsis -Get the solution using the applicable solutionResourceName while creating the solution. +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. .Description -Get the solution using the applicable solutionResourceName while creating the solution. +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. .Example -Get-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/testkv/testDB +$resourceName = "sampleRName" + +Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource .Notes COMPLEX PARAMETER PROPERTIES @@ -379,27 +378,30 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link -https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution #> -function Get-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +function Get-AzSelfHelpSimplifiedSolution { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('SolutionResourceName')] + [Alias('SimplifiedSolutionsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] - # Solution resource Name. - ${ResourceName}, + # Simplified Solutions Resource Name. + ${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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -484,8 +486,8 @@ begin { } $mapping = @{ - Get = 'Az.SelfHelp.private\Get-AzSelfHelpSolution_Get'; - GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSolution_GetViaIdentity'; + Get = 'Az.SelfHelp.private\Get-AzSelfHelpSimplifiedSolution_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSimplifiedSolution_GetViaIdentity'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -539,18 +541,18 @@ end { <# .Synopsis -Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. .Description -Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. .Example -Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp .Notes COMPLEX PARAMETER PROPERTIES @@ -559,27 +561,205 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link -https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp #> -function Get-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource])] +function Get-AzSelfHelpSolutionSelfHelp { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('TroubleshooterName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] - # Troubleshooter resource Name. - ${Name}, + # SolutionId is a unique id to identify a solution. + # You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + ${SolutionId}, + + [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-AzSelfHelpSolutionSelfHelp_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSolutionSelfHelp_GetViaIdentity'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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 +Get the solution using the applicable solutionResourceName while creating the solution. +.Description +Get the solution using the applicable solutionResourceName while creating the solution. +.Example +Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +.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 ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution +#> +function Get-AzSelfHelpSolution { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SolutionResourceName')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Solution resource Name. + ${ResourceName}, [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -664,8 +844,8 @@ begin { } $mapping = @{ - Get = 'Az.SelfHelp.private\Get-AzSelfHelpTroubleshooter_Get'; - GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpTroubleshooter_GetViaIdentity'; + Get = 'Az.SelfHelp.private\Get-AzSelfHelpSolution_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpSolution_GetViaIdentity'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -719,81 +899,1138 @@ end { <# .Synopsis -This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions +Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. +This API requires the Troubleshooter resource name that was created using the Create API. .Description -This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions +Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. +This API requires the Troubleshooter resource name that was created using the Create API. .Example -$CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ - "name" ="helloworld" - “type” = “solutions” - -} - Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST +Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource .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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link -https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability +https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter #> -function Invoke-AzSelfHelpCheckNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse])] -[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzSelfHelpTroubleshooter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Post', Mandatory)] - [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('TroubleshooterName')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Troubleshooter resource Name. + ${Name}, + + [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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [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(ParameterSetName='Post', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest] - # The check availability request body. - # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. - ${CheckNameAvailabilityRequest}, + [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(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The name of the resource for which availability needs to be checked. - ${Name}, + [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-AzSelfHelpTroubleshooter_Get'; + GetViaIdentity = 'Az.SelfHelp.private\Get-AzSelfHelpTroubleshooter_GetViaIdentity'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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, troubleshooter or solutions +.Description +This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions +.Example +$CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ + "name" ="helloworld" + “type” = “solutions” + +} + Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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 ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability +#> +function Invoke-AzSelfHelpCheckNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post', Mandatory)] + [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', 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='Post', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest] + # The check availability request body. + # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. + ${CheckNameAvailabilityRequest}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # The name of the resource for which availability needs to be checked. + ${Name}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [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 = @{ + Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_Post'; + PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostExpanded'; + PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentity'; + PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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 +Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. +This API is used after the Troubleshooter has been created using the Create API. +.Description +Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. +This API is used after the Troubleshooter has been created using the Create API. +.Example +$continueRequest = [ordered]@{ + "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" +} + +Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CONTINUEREQUESTBODY : Troubleshooter ContinueRequest body. + [Response ]: + [QuestionId ]: id of the question. + [QuestionType ]: Type of Question + [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text + [StepId ]: Unique id of the result. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + +RESPONSE : . + [QuestionId ]: id of the question. + [QuestionType ]: Type of Question + [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter +#> +function Invoke-AzSelfHelpContinueTroubleshooter { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='ContinueExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Continue', Mandatory)] + [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, + + [Parameter(ParameterSetName='Continue', Mandatory)] + [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Troubleshooter resource Name. + ${TroubleshooterName}, + + [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ContinueViaIdentityExpanded', 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='Continue', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody] + # Troubleshooter ContinueRequest body. + # To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. + ${ContinueRequestBody}, + + [Parameter(ParameterSetName='ContinueExpanded')] + [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]] + # . + # To construct, see NOTES section for RESPONSE properties and create a hash table. + ${Response}, + + [Parameter(ParameterSetName='ContinueExpanded')] + [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Unique id of the result. + ${StepId}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [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 = @{ + Continue = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_Continue'; + ContinueExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueExpanded'; + ContinueViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentity'; + ContinueViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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 +Solution discovery using natural language processing. +.Description +Solution discovery using natural language processing. +.Example +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +.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. + +DISCOVERSOLUTIONREQUEST : Discover NLP request. + [AdditionalContext ]: Additional information in the form of a string. + [IssueSummary ]: Describe the issue with the affected resource. + [ResourceId ]: Provide resourceId of affected resource + [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope +#> +function Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post')] + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', 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='Post', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + # Discover NLP request. + # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + ${DiscoverSolutionRequest}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Additional information in the form of a string. + ${AdditionalContext}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Describe the issue with the affected resource. + ${IssueSummary}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Provide resourceId of affected resource + ${ResourceId}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Service Classification id for the resource. + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + ${ServiceId}, + + [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 = @{ + Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post'; + PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded'; + PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity'; + PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded'; + } + if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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 +Solution discovery using natural language processing. +.Description +Solution discovery using natural language processing. +.Example +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +.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. + +DISCOVERSOLUTIONREQUEST : Discover NLP request. + [AdditionalContext ]: Additional information in the form of a string. + [IssueSummary ]: Describe the issue with the affected resource. + [ResourceId ]: Provide resourceId of affected resource + [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope +#> +function Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + # Discover NLP request. + # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + ${DiscoverSolutionRequest}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Additional information in the form of a string. + ${AdditionalContext}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Describe the issue with the affected resource. + ${IssueSummary}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Provide resourceId of affected resource + ${ResourceId}, + + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Service Classification id for the resource. + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + ${ServiceId}, + + [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 = @{ + Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_Post'; + PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.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 +Warm up the solution resource by preloading asynchronous diagnostics results into cache +.Description +Warm up the solution resource by preloading asynchronous diagnostics results into cache +.Example +$resourceName = "sampleRName" +$parameters = [ordered]@{ + "ProductId" = "13491" +} +Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + +SOLUTIONWARMUPREQUESTBODY : Solution WarmUpRequest body + [Parameter ]: Dictionary of + [(Any) ]: This indicates any property can be added to this object. +.Link +https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup +#> +function Invoke-AzSelfHelpWarmSolutionUp { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='WarmExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Warm', Mandatory)] + [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, + + [Parameter(ParameterSetName='Warm', Mandatory)] + [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [System.String] + # Solution resource Name. + ${SolutionResourceName}, + + [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='WarmViaIdentityExpanded', 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='Warm', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody] + # Solution WarmUpRequest body + # To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. + ${SolutionWarmUpRequestBody}, - [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Parameter(ParameterSetName='WarmExpanded')] + [Parameter(ParameterSetName='WarmViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The resource type. - ${Type}, + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters]))] + [System.Collections.Hashtable] + # Dictionary of + ${Parameter}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -824,6 +2061,12 @@ param( # 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] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')] [System.Uri] @@ -870,10 +2113,10 @@ begin { } $mapping = @{ - Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_Post'; - PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostExpanded'; - PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentity'; - PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded'; + Warm = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_Warm'; + WarmExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmExpanded'; + WarmViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentity'; + WarmViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -927,101 +2170,62 @@ end { <# .Synopsis -Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. -
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Description -Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. -
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Example -$continueRequest = [ordered]@{ - "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" -} - -Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest +$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 -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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. -CONTINUEREQUESTBODY : Troubleshooter ContinueRequest body. - [Response ]: - [QuestionId ]: id of the question. - [QuestionType ]: Text Input. Will be a single line input. - [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text - [StepId ]: Unique id of the result. - -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. - [SolutionResourceName ]: Solution resource Name. - [TroubleshooterName ]: Troubleshooter resource Name. - -RESPONSE : . - [QuestionId ]: id of the question. - [QuestionType ]: Text Input. Will be a single line input. - [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text +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/invoke-azselfhelpcontinuetroubleshooter +https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic #> -function Invoke-AzSelfHelpContinueTroubleshooter { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='ContinueExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzSelfHelpDiagnostic { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Continue', Mandatory)] - [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(Mandatory)] + [Alias('DiagnosticsResourceName')] [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}, + # Unique resource name for insight resources + ${SResourceName}, - [Parameter(ParameterSetName='Continue', Mandatory)] - [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] - # Troubleshooter resource Name. - ${TroubleshooterName}, - - [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='ContinueViaIdentityExpanded', 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}, + # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ${Scope}, - [Parameter(ParameterSetName='Continue', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody] - # Troubleshooter ContinueRequest body. - # To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. - ${ContinueRequestBody}, + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters]))] + [System.Collections.Hashtable] + # Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results + ${GlobalParameter}, - [Parameter(ParameterSetName='ContinueExpanded')] - [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[]] - # . - # To construct, see NOTES section for RESPONSE properties and create a hash table. - ${Response}, - - [Parameter(ParameterSetName='ContinueExpanded')] - [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # Unique id of the result. - ${StepId}, + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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')] @@ -1032,6 +2236,12 @@ param( # 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] @@ -1055,8 +2265,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, + # Run the command asynchronously + ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Runtime')] @@ -1104,10 +2314,7 @@ begin { } $mapping = @{ - Continue = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_Continue'; - ContinueExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueExpanded'; - ContinueViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentity'; - ContinueViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded'; + 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) @@ -1161,66 +2368,60 @@ end { <# .Synopsis -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -

Note: requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +

Note:
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +
.Description -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -

Note: requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +

Note:
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions 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.Api20230901Preview.IDiagnosticResource -.Notes -COMPLEX PARAMETER PROPERTIES +$resourceName = "sampleRName" +$solutionId = "9004345-7759" +$parameters = [ordered]@{ -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. + "SearchText" = "Billing" +} +New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters -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. +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource .Link -https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic +https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution #> -function New-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource])] +function New-AzSelfHelpSimplifiedSolution { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] - [Alias('DiagnosticsResourceName')] + [Alias('SimplifiedSolutionsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] - # Unique resource name for insight resources + # Simplified Solutions Resource Name. ${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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters]))] [System.Collections.Hashtable] - # Global parameters that can be passed to all solutionIds. - ${GlobalParameter}, + # Client input parameters to run Simplified Solutions + ${Parameter}, [Parameter()] - [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]] - # SolutionIds that are needed to be invoked. - # To construct, see NOTES section for INSIGHT properties and create a hash table. - ${Insight}, + [System.String] + # Solution Id to identify single Simplified Solution. + ${SolutionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1309,7 +2510,7 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateExpanded'; + CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateExpanded'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1363,8 +2564,10 @@ end { <# .Synopsis -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. @@ -1373,8 +2576,10 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Description -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. @@ -1383,123 +2588,24 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Example -$criteria = [ordered]@{ - "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" -} -$parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" -} -New-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/kv/testDB -Parameter $parameters -TriggerCriterion $criteria +$criteria = [ordered]@{ + "name" ="SolutionId" + "value" = "apollo-cognitve-search-custom-skill" +} + +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} + +New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource .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. -REPLACEMENTMAPDIAGNOSTIC : Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - -REPLACEMENTMAPMETRICSBASEDCHART : Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - -REPLACEMENTMAPTROUBLESHOOTER : Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - -REPLACEMENTMAPVIDEO : Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - -REPLACEMENTMAPVIDEOGROUP : Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - -REPLACEMENTMAPWEBRESULT : Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - -SECTION : List of section object. - [Content ]: Solution sections content. - [ReplacementMapDiagnostic ]: Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - [ReplacementMapMetricsBasedChart ]: Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - [ReplacementMapTroubleshooter ]: Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - [ReplacementMapVideo ]: Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [ReplacementMapVideoGroup ]: Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementMapWebResult ]: Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - [Title ]: Solution sections title. - TRIGGERCRITERION : Solution request trigger criteria [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. @@ -1507,7 +2613,7 @@ TRIGGERCRITERION : Solution request trigger criteria https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution #> function New-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1520,101 +2626,20 @@ 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The HTML content that needs to be rendered and shown to customer. - ${Content}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState])] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState] - # Status of solution provisioning. - ${ProvisioningState}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]] - # Solution diagnostics results. - # To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. - ${ReplacementMapDiagnostic}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]] - # Solution metrics based charts - # To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - ${ReplacementMapMetricsBasedChart}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]] - # Solutions Troubleshooters - # To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - ${ReplacementMapTroubleshooter}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]] - # Video solutions, which have the power to engage the customer by stimulating their senses - # To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. - ${ReplacementMapVideo}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]] - # Group of Videos - # To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - ${ReplacementMapVideoGroup}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]] - # Solution AzureKB results - # To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - ${ReplacementMapWebResult}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]] - # List of section object. - # To construct, see NOTES section for SECTION properties and create a hash table. - ${Section}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # Solution Id to identify single solution. - ${SolutionId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The title. - ${Title}, - [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] # Solution request trigger criteria # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, @@ -1761,18 +2786,16 @@ end { <# .Synopsis Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE API. -

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Description Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE API. -

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Example $parameters = [ordered]@{ "addParam1"= "/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6" @@ -1782,12 +2805,12 @@ New-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a 6af-43e1-96d3-bf71f6f5f8ba" -Name "12d59989-f8a9-4b69-9919-1ef51df4eff6" -Parameter $parameters -SolutionId "e104dbdf-9e14-4c9f-bc78-21ac90382231" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter #> function New-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1800,12 +2823,12 @@ 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Troubleshooter Resource ${Parameter}, @@ -1956,7 +2979,7 @@ Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -1965,14 +2988,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter #> function Restart-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Restart', Mandatory)] @@ -1985,7 +3011,7 @@ param( [Parameter(ParameterSetName='Restart', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] @@ -2143,8 +3169,11 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/stop-azselfhelptroubleshooter @@ -2163,7 +3192,7 @@ param( [Parameter(ParameterSetName='End', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='EndViaIdentity', Mandatory, ValueFromPipeline)] @@ -2314,19 +3343,18 @@ Update the requiredInputs or additional information needed to execute the soluti Update the requiredInputs or additional information needed to execute the solution .Example $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } $criteria = [ordered]@{ "name" =" ReplacementKey" "value" = "" } -Update-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -2335,110 +3363,13 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. -REPLACEMENTMAPDIAGNOSTIC : Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - -REPLACEMENTMAPMETRICSBASEDCHART : Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - -REPLACEMENTMAPTROUBLESHOOTER : Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - -REPLACEMENTMAPVIDEO : Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - -REPLACEMENTMAPVIDEOGROUP : Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - -REPLACEMENTMAPWEBRESULT : Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - -SECTION : List of section object. - [Content ]: Solution sections content. - [ReplacementMapDiagnostic ]: Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - [ReplacementMapMetricsBasedChart ]: Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - [ReplacementMapTroubleshooter ]: Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - [ReplacementMapVideo ]: Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [ReplacementMapVideoGroup ]: Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementMapWebResult ]: Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - [Title ]: Solution sections title. - TRIGGERCRITERION : Solution request trigger criteria [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. @@ -2446,7 +3377,7 @@ TRIGGERCRITERION : Solution request trigger criteria https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution #> function Update-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2459,7 +3390,7 @@ param( [Parameter(ParameterSetName='UpdateExpanded', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -2471,96 +3402,15 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The HTML content that needs to be rendered and shown to customer. - ${Content}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState])] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState] - # Status of solution provisioning. - ${ProvisioningState}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]] - # Solution diagnostics results. - # To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. - ${ReplacementMapDiagnostic}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]] - # Solution metrics based charts - # To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - ${ReplacementMapMetricsBasedChart}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]] - # Solutions Troubleshooters - # To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - ${ReplacementMapTroubleshooter}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]] - # Video solutions, which have the power to engage the customer by stimulating their senses - # To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. - ${ReplacementMapVideo}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]] - # Group of Videos - # To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - ${ReplacementMapVideoGroup}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]] - # Solution AzureKB results - # To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - ${ReplacementMapWebResult}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]] - # List of section object. - # To construct, see NOTES section for SECTION properties and create a hash table. - ${Section}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # Solution Id to identify single solution. - ${SolutionId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The title. - ${Title}, - [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] # Solution request trigger criteria # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 index 4c54b6f4a6cd..5a37bd0ace08 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 @@ -27,7 +27,7 @@ Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -36,14 +36,17 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter #> function Restart-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Restart', Mandatory)] @@ -56,7 +59,7 @@ param( [Parameter(ParameterSetName='Restart', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 index d2e759c3079e..09ce3dcbc22f 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 @@ -34,8 +34,11 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/stop-azselfhelptroubleshooter @@ -54,7 +57,7 @@ param( [Parameter(ParameterSetName='End', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='EndViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/src/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 b/src/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 index ecb96610c91a..073bc7ff1b24 100644 --- a/src/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 @@ -21,19 +21,18 @@ Update the requiredInputs or additional information needed to execute the soluti Update the requiredInputs or additional information needed to execute the solution .Example $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } $criteria = [ordered]@{ "name" =" ReplacementKey" "value" = "" } -Update-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -42,110 +41,13 @@ To create the parameters described below, construct a hash table containing the 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. + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [TroubleshooterName ]: Troubleshooter resource Name. -REPLACEMENTMAPDIAGNOSTIC : Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - -REPLACEMENTMAPMETRICSBASEDCHART : Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - -REPLACEMENTMAPTROUBLESHOOTER : Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - -REPLACEMENTMAPVIDEO : Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - -REPLACEMENTMAPVIDEOGROUP : Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - -REPLACEMENTMAPWEBRESULT : Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - -SECTION : List of section object. - [Content ]: Solution sections content. - [ReplacementMapDiagnostic ]: Solution diagnostics results. - [Insight ]: Diagnostic insights - [Id ]: Article id. - [ImportanceLevel ]: Importance level of the insight. - [Result ]: Detailed result content. - [Title ]: This insight's title. - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [RequiredParameter ]: Required parameters of this item - [SolutionId ]: Solution Id to identify single Solutions Diagnostic - [Status ]: Denotes the status of the diagnostic resource. - [StatusDetail ]: Details of the status - [ReplacementMapMetricsBasedChart ]: Solution metrics based charts - [AggregationType ]: Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [FilterGroupFilter ]: List of filters - [Name ]: Filter name - [Operator ]: Filter operator - [Value ]: Filter values - [Name ]: Chart name - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [TimeSpanDuration ]: Time span duration - [Title ]: Chart title - [ReplacementMapTroubleshooter ]: Solutions Troubleshooters - [SolutionId ]: Solution Id to identify single Solutions Troubleshooter - [Summary ]: Troubleshooter summary - [Title ]: Troubleshooter title - [ReplacementMapVideo ]: Video solutions, which have the power to engage the customer by stimulating their senses - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [ReplacementMapVideoGroup ]: Group of Videos - [ReplacementKey ]: Place holder used in HTML Content replace control with the insight content - [Video ]: List of videos will be shown to customers - [Src ]: Link to the video - [Title ]: Title of the video - [ReplacementMapWebResult ]: Solution AzureKB results - [ReplacementKey ]: Place holder used in HTML Content replace control with the content - [SearchResult ]: AzureKB search results - [Confidence ]: Confidence of the search result. - [Content ]: Content of the search result. - [Link ]: Link to the document. - [Rank ]: rank of the search result - [ResultType ]: Result type of the search result. - [SolutionId ]: Unique id of the result. - [Source ]: Source of the search result. - [Title ]: Title of the search result. - [Title ]: Solution sections title. - TRIGGERCRITERION : Solution request trigger criteria [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. @@ -153,7 +55,7 @@ TRIGGERCRITERION : Solution request trigger criteria https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution #> function Update-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -166,7 +68,7 @@ param( [Parameter(ParameterSetName='UpdateExpanded', 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 = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -178,96 +80,15 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The HTML content that needs to be rendered and shown to customer. - ${Content}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState])] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState] - # Status of solution provisioning. - ${ProvisioningState}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]] - # Solution diagnostics results. - # To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. - ${ReplacementMapDiagnostic}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]] - # Solution metrics based charts - # To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - ${ReplacementMapMetricsBasedChart}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]] - # Solutions Troubleshooters - # To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - ${ReplacementMapTroubleshooter}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]] - # Video solutions, which have the power to engage the customer by stimulating their senses - # To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. - ${ReplacementMapVideo}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]] - # Group of Videos - # To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - ${ReplacementMapVideoGroup}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]] - # Solution AzureKB results - # To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - ${ReplacementMapWebResult}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]] - # List of section object. - # To construct, see NOTES section for SECTION properties and create a hash table. - ${Section}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # Solution Id to identify single solution. - ${SolutionId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [System.String] - # The title. - ${Title}, - [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] # Solution request trigger criteria # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/Module.cs b/src/SelfHelp/SelfHelp.Autorest/generated/Module.cs index 1acc10ffd863..6a3fafe9a185 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/Module.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; /// A class that contains the module-common code and data. public partial class Module @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.SelfHelp"; + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + /// The delegate for creating a telemetry. public TelemetryDelegate Telemetry { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs similarity index 77% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs index 36e606e50441..6364f5dfc5f3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AutomatedCheckResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -76,19 +76,27 @@ internal AutomatedCheckResult(global::System.Collections.IDictionary content) return; } // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); + } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,41 +109,49 @@ internal AutomatedCheckResult(global::System.Management.Automation.PSObject cont return; } // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); + } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IAutomatedCheckResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AutomatedCheckResult(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IAutomatedCheckResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AutomatedCheckResult(content); } @@ -145,7 +161,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs index 196e718ff3ed..89bf4ac21ebc 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs similarity index 62% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs index 682d2b61bdd3..5e3120014513 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Only for AutomatedStep type public partial class AutomatedCheckResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal { /// Backing field for property. @@ -20,6 +20,13 @@ public partial class AutomatedCheckResult : [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 _status; + + /// Status for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? _type; @@ -27,6 +34,13 @@ public partial class AutomatedCheckResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get => this._type; set => this._type = value; } + /// Backing field for property. + private string _version; + + /// Version for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + /// Creates an new instance. public AutomatedCheckResult() { @@ -45,6 +59,14 @@ public partial interface IAutomatedCheckResult : SerializedName = @"result", PossibleTypes = new [] { typeof(string) })] string Result { get; set; } + /// Status for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status for automated check result", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } /// Type of Result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -53,6 +75,14 @@ public partial interface IAutomatedCheckResult : SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType) })] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get; set; } + /// Version for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version for automated check result", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } } /// Only for AutomatedStep type @@ -61,8 +91,12 @@ internal partial interface IAutomatedCheckResultInternal { /// Insight Article Content string Result { get; set; } + /// Status for automated check result + string Status { get; set; } /// Type of Result. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get; set; } + /// Version for automated check result + string Version { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs index b6ff06a5503c..f5acc7c5bcb1 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/AutomatedCheckResult.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,21 @@ internal AutomatedCheckResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtim { return; } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} {_result = If( json?.PropertyT("result"), out var __jsonResult) ? (string)__jsonResult : (string)Result;} {_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.Api20230901Preview.IAutomatedCheckResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new AutomatedCheckResult(json) : null; } @@ -101,6 +103,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,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 ); 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, "result" ,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); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs similarity index 88% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs index 8df6fed7b64e..9fe7d78deccf 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal CheckNameAvailabilityResponse(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,43 @@ internal CheckNameAvailabilityResponse(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityResponse(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityResponse(content); } @@ -153,7 +153,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs index dcee067a1ae3..4cc35a6889fd 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs index bcd4cccff509..11365f1cc72e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { 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.Api20230901Preview.ICheckNameAvailabilityResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs index 498ac73487be..3026e22447b5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/CheckNameAvailabilityResponse.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -72,13 +72,13 @@ internal CheckNameAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHe } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.PowerShell.cs new file mode 100644 index 000000000000..a36a2f0bc635 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Service Classification result object. + [System.ComponentModel.TypeConverter(typeof(ClassificationServiceTypeConverter))] + public partial class ClassificationService + { + + /// + /// 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 ClassificationService(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType = (string[]) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ClassificationService(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType = (string[]) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClassificationService(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.Api20240301Preview.IClassificationService DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClassificationService(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.Api20240301Preview.IClassificationService 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(); + } + } + /// Service Classification result object. + [System.ComponentModel.TypeConverter(typeof(ClassificationServiceTypeConverter))] + public partial interface IClassificationService + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.TypeConverter.cs new file mode 100644 index 000000000000..91885adc7083 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ClassificationServiceTypeConverter : 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.Api20240301Preview.IClassificationService ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ClassificationService.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ClassificationService.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ClassificationService.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs new file mode 100644 index 000000000000..ade015e977f6 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Service Classification result object. + public partial class ClassificationService : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal + { + + /// Backing field for property. + private string _displayName; + + /// Localized name of the azure service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for ServiceId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal.ServiceId { get => this._serviceId; set { {_serviceId = value;} } } + + /// Backing field for property. + private string[] _resourceType; + + /// List of applicable ARM resource types for this service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string[] ResourceType { get => this._resourceType; set => this._resourceType = value; } + + /// Backing field for property. + private string _serviceId; + + /// Azure resource Id of the service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ServiceId { get => this._serviceId; } + + /// Creates an new instance. + public ClassificationService() + { + + } + } + /// Service Classification result object. + public partial interface IClassificationService : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Localized name of the azure service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Localized name of the azure service.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// List of applicable ARM resource types for this service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of applicable ARM resource types for this service.", + SerializedName = @"resourceTypes", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceType { get; set; } + /// Azure resource Id of the service. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource Id of the service.", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + string ServiceId { get; } + + } + /// Service Classification result object. + internal partial interface IClassificationServiceInternal + + { + /// Localized name of the azure service. + string DisplayName { get; set; } + /// List of applicable ARM resource types for this service. + string[] ResourceType { get; set; } + /// Azure resource Id of the service. + string ServiceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.json.cs new file mode 100644 index 000000000000..398766a42f34 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Service Classification result object. + public partial class ClassificationService + { + + /// + /// 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 ClassificationService(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_resourceType = If( json?.PropertyT("resourceTypes"), out var __jsonResourceTypes) ? If( __jsonResourceTypes 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)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ClassificationService(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._serviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._serviceId.ToString()) : null, "serviceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (null != this._resourceType) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceType ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceTypes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs index e7cf136b155f..a1fe318a3620 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ContinueRequestBody partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ContinueRequestBody(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("StepId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,39 @@ internal ContinueRequestBody(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("StepId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IContinueRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContinueRequestBody(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IContinueRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContinueRequestBody(content); } @@ -145,7 +145,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs index e023abab2851..ade07150ac0d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs index a189a643540d..c381612687bc 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs @@ -3,21 +3,21 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter ContinueRequest body. public partial class ContinueRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] _response; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] _response; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] Response { get => this._response; set => this._response = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => this._response; set => this._response = value; } /// Backing field for property. private string _stepId; @@ -41,8 +41,8 @@ public partial interface IContinueRequestBody : ReadOnly = false, Description = @"", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] Response { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get; set; } /// Unique id of the result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -57,7 +57,7 @@ public partial interface IContinueRequestBody : internal partial interface IContinueRequestBodyInternal { - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] Response { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get; set; } /// Unique id of the result. string StepId { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs index d02e68a4608a..0c14b2abc534 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ContinueRequestBody.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -66,18 +66,18 @@ internal ContinueRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime return; } {_stepId = If( json?.PropertyT("stepId"), out var __jsonStepId) ? (string)__jsonStepId : (string)StepId;} - {_response = If( json?.PropertyT("responses"), out var __jsonResponses) ? If( __jsonResponses 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.Api20230901Preview.ITroubleshooterResponse) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResponse.FromJson(__u) )) ))() : null : Response;} + {_response = If( json?.PropertyT("responses"), out var __jsonResponses) ? If( __jsonResponses 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.Api20240301Preview.ITroubleshooterResponse) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse.FromJson(__u) )) ))() : null : Response;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ContinueRequestBody(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs similarity index 77% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs index d6d472cce7d0..e953d7fa25b4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Diagnostic partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Diagnostic(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Diagnostic(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,41 +104,41 @@ internal Diagnostic(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,35 +153,35 @@ internal Diagnostic(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -191,7 +191,7 @@ internal Diagnostic(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs index 1f6e231320cc..d908c73e8516 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs similarity index 83% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs index fbccbf7c8e19..290c61a09277 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs @@ -3,57 +3,57 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { 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.Api20230901Preview.IDiagnostic, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IErrorInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError _error; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError _error; /// Error definition. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error()); set => this._error = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] _insight; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IErrorInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Code = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)Error).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type = value; } /// Backing field for property. private string _solutionId; @@ -73,7 +73,7 @@ public partial class Diagnostic : /// 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.Api20230901Preview.IErrorInternal)Error).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type; } /// Creates an new instance. public Diagnostic() @@ -103,16 +103,16 @@ public partial interface IDiagnostic : 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.Api20230901Preview.IError) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// Description of the error. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -160,11 +160,11 @@ internal partial interface IDiagnosticInternal /// /// An array of additional nested error response info objects, as described by this contract. /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } /// Error definition. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Error { get; set; } /// The problems (if any) detected by this insight. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// Description of the error. string Message { get; set; } /// Solution Id diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs index 4ff46fea90f5..d8b61859b259 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Diagnostic.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,21 +65,21 @@ internal Diagnostic(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Jso { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Insight.FromJson(__u) )) ))() : null : Insight;} + {_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.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__u) )) ))() : null : Insight;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs index de845131c59c..f2311e8c3121 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class DiagnosticInvocation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticInvocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticInvocation(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticInvocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticInvocation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,17 +106,17 @@ internal DiagnosticInvocation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("AdditionalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,11 +131,11 @@ internal DiagnosticInvocation(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("AdditionalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -145,7 +145,7 @@ internal DiagnosticInvocation(global::System.Management.Automation.PSObject cont /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs index a24f6e72f416..e3fad3bca9e4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs index 13f5c440b53a..63096519d916 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs @@ -3,22 +3,22 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { 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.Api20230901Preview.IDiagnosticInvocation, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters _additionalParameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get => (this._additionalParameter = this._additionalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParameters()); set => this._additionalParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get => (this._additionalParameter = this._additionalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters()); set => this._additionalParameter = value; } /// Backing field for property. private string _solutionId; @@ -43,8 +43,8 @@ public partial interface IDiagnosticInvocation : ReadOnly = false, Description = @"Additional parameters required to invoke the solutionId.", SerializedName = @"additionalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } /// Solution Id to invoke. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -60,7 +60,7 @@ internal partial interface IDiagnosticInvocationInternal { /// Additional parameters required to invoke the solutionId. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } /// Solution Id to invoke. string SolutionId { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs index 2eb3367e4a4a..cd78ba960d84 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocation.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -66,18 +66,18 @@ internal DiagnosticInvocation(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtim 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.Api20230901Preview.DiagnosticInvocationAdditionalParameters.FromJson(__jsonAdditionalParameters) : AdditionalParameter;} + {_additionalParameter = If( json?.PropertyT("additionalParameters"), out var __jsonAdditionalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters.FromJson(__jsonAdditionalParameters) : AdditionalParameter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs similarity index 93% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs index c4069f64f48f..20e4763aa4ff 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class DiagnosticInvocationAdditionalParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticInvocationAdditionalParameters(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticInvocationAdditionalParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal DiagnosticInvocationAdditionalParameters(global::System.Collections.IDi } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal DiagnosticInvocationAdditionalParameters(global::System.Management.Auto /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs index bb48d8cbb368..ad0d010c2f45 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs index e7074d38ae4c..6f04e661bdab 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { 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.Api20230901Preview.IDiagnosticInvocationAdditionalParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParametersInternal { /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs index 74027f6ea369..874e86e62817 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationAdditionalParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs index 8ff71a3774c7..2cc87762c7bf 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticInvocationAdditionalParameters.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -71,13 +71,13 @@ internal DiagnosticInvocationAdditionalParameters(Microsoft.Azure.PowerShell.Cmd } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocationAdditionalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs similarity index 84% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs index 0bb85eaf4b65..047857a104e2 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class DiagnosticResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticResource(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,7 +104,7 @@ internal DiagnosticResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -148,29 +148,29 @@ internal DiagnosticResource(global::System.Collections.IDictionary content) } if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -185,7 +185,7 @@ internal DiagnosticResource(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -229,23 +229,23 @@ internal DiagnosticResource(global::System.Management.Automation.PSObject conten } if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -255,7 +255,7 @@ internal DiagnosticResource(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs index 876a0de967c2..350170bd72b9 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs similarity index 84% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs index f1ead366586f..53330d6c19d7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Diagnostic resource public partial class DiagnosticResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// @@ -20,15 +20,18 @@ public partial class DiagnosticResource : /// 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.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; } + public string AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnostic[] Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; } - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter = value ?? null /* model class */; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" @@ -38,19 +41,19 @@ public partial class DiagnosticResource : /// 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.Api20230901Preview.IDiagnosticInvocation[] Insight { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).Insight; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).Insight = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Insight; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Insight = value ?? null /* arrayOf */; } /// Internal Acessors for AcceptedAt - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal.AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt = value; } /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } @@ -69,15 +72,15 @@ public partial class DiagnosticResource : public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnosticResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.DiagnosticProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] @@ -156,24 +159,27 @@ public partial interface IDiagnosticResource : ReadOnly = true, Description = @"Array of Diagnostics.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Diagnostic { get; } - /// Global parameters that can be passed to all solutionIds. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Global parameters that can be passed to all solutionIds.", + Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnosticInvocation) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } /// Status of diagnostic provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -191,13 +197,16 @@ internal partial interface IDiagnosticResourceInternal : /// Diagnostic Request Accepted time. string AcceptedAt { get; set; } /// Array of Diagnostics. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Diagnostic { get; set; } - /// Global parameters that can be passed to all solutionIds. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; set; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } /// SolutionIds that are needed to be invoked. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] Insight { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } /// Diagnostic Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Property { get; set; } /// Status of diagnostic provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs index 511b8990731b..81edf0304686 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResource.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -66,18 +66,18 @@ internal DiagnosticResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime. return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourceProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs similarity index 79% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs index 6089fa3b1494..4e2e18f23d1e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class DiagnosticResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticResourceProperties(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticResourceProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,29 +106,29 @@ internal DiagnosticResourceProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -143,23 +143,23 @@ internal DiagnosticResourceProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -169,7 +169,7 @@ internal DiagnosticResourceProperties(global::System.Management.Automation.PSObj /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs index 226c1639fde6..a05d7a989e12 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs similarity index 76% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs index 93eabcaf8127..828dbb348b0b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Diagnostic resource properties. public partial class DiagnosticResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal { /// Backing field for property. @@ -21,34 +21,37 @@ public partial class DiagnosticResourceProperties : public string AcceptedAt { get => this._acceptedAt; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] _diagnostic; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnostic[] Diagnostic { get => this._diagnostic; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get => this._diagnostic; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters _globalParameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters _globalParameter; - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => (this._globalParameter = this._globalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParameters()); set => this._globalParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => (this._globalParameter = this._globalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters()); set => this._globalParameter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] _insight; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnosticInvocation[] Insight { get => this._insight; set => this._insight = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => this._insight; set => this._insight = value; } /// Internal Acessors for AcceptedAt - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal.AcceptedAt { get => this._acceptedAt; set { {_acceptedAt = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.AcceptedAt { get => this._acceptedAt; set { {_acceptedAt = value;} } } /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal.Diagnostic { get => this._diagnostic; set { {_diagnostic = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.Diagnostic { get => this._diagnostic; set { {_diagnostic = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? _provisioningState; @@ -81,24 +84,27 @@ public partial interface IDiagnosticResourceProperties : ReadOnly = true, Description = @"Array of Diagnostics.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Diagnostic { get; } - /// Global parameters that can be passed to all solutionIds. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Global parameters that can be passed to all solutionIds.", + Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnosticInvocation) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } /// Status of diagnostic provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -116,11 +122,14 @@ internal partial interface IDiagnosticResourcePropertiesInternal /// Diagnostic Request Accepted time. string AcceptedAt { get; set; } /// Array of Diagnostics. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnostic[] Diagnostic { get; set; } - /// Global parameters that can be passed to all solutionIds. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; set; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } /// SolutionIds that are needed to be invoked. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] Insight { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } /// Status of diagnostic provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs similarity index 93% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs index 6e1c6574ffdd..ff2500971f78 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourceProperties.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,22 +65,22 @@ internal DiagnosticResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHel { return; } - {_globalParameter = If( json?.PropertyT("globalParameters"), out var __jsonGlobalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.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.Api20230901Preview.IDiagnosticInvocation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticInvocation.FromJson(__u) )) ))() : null : Insight;} + {_globalParameter = If( json?.PropertyT("globalParameters"), out var __jsonGlobalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20240301Preview.IDiagnosticInvocation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Diagnostic.FromJson(__p) )) ))() : null : Diagnostic;} + {_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.Api20240301Preview.IDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic.FromJson(__p) )) ))() : null : Diagnostic;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs similarity index 90% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs index ae5d051585bf..237dc2b09089 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs @@ -3,11 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesGlobalParametersTypeConverter))] public partial class DiagnosticResourcePropertiesGlobalParameters { @@ -63,35 +66,35 @@ public partial class DiagnosticResourcePropertiesGlobalParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticResourcePropertiesGlobalParameters(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticResourcePropertiesGlobalParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +113,7 @@ internal DiagnosticResourcePropertiesGlobalParameters(global::System.Collections } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +139,7 @@ internal DiagnosticResourcePropertiesGlobalParameters(global::System.Management. /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -155,7 +158,8 @@ public override string ToString() return ToJsonString(); } } - /// Global parameters that can be passed to all solutionIds. + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results [System.ComponentModel.TypeConverter(typeof(DiagnosticResourcePropertiesGlobalParametersTypeConverter))] public partial interface IDiagnosticResourcePropertiesGlobalParameters diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs index 0a804139a396..2c51f3818db3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs similarity index 67% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs index 5ce126589552..40c7e611fa73 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs @@ -3,14 +3,17 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// public partial class DiagnosticResourcePropertiesGlobalParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParametersInternal { /// @@ -21,14 +24,16 @@ public DiagnosticResourcePropertiesGlobalParameters() } } - /// Global parameters that can be passed to all solutionIds. + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results 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. + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results internal partial interface IDiagnosticResourcePropertiesGlobalParametersInternal { diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs index cba6ea236ef7..099cb38beb4e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResourcePropertiesGlobalParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs similarity index 94% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs index c4837d11d910..dcb3e9e8ac0a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs @@ -3,11 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// public partial class DiagnosticResourcePropertiesGlobalParameters { @@ -72,13 +75,13 @@ internal DiagnosticResourcePropertiesGlobalParameters(Microsoft.Azure.PowerShell } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.PowerShell.cs new file mode 100644 index 000000000000..493becfc6035 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Discover NLP request. + [System.ComponentModel.TypeConverter(typeof(DiscoveryNlpRequestTypeConverter))] + public partial class DiscoveryNlpRequest + { + + /// + /// 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.Api20240301Preview.IDiscoveryNlpRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DiscoveryNlpRequest(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.Api20240301Preview.IDiscoveryNlpRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DiscoveryNlpRequest(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DiscoveryNlpRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IssueSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("AdditionalContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext, 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 DiscoveryNlpRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IssueSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("AdditionalContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext, 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.Api20240301Preview.IDiscoveryNlpRequest 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(); + } + } + /// Discover NLP request. + [System.ComponentModel.TypeConverter(typeof(DiscoveryNlpRequestTypeConverter))] + public partial interface IDiscoveryNlpRequest + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.TypeConverter.cs new file mode 100644 index 000000000000..ce162f38d371 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DiscoveryNlpRequestTypeConverter : 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.Api20240301Preview.IDiscoveryNlpRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DiscoveryNlpRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DiscoveryNlpRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DiscoveryNlpRequest.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.cs new file mode 100644 index 000000000000..207c51dec24c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Discover NLP request. + public partial class DiscoveryNlpRequest : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal + { + + /// Backing field for property. + private string _additionalContext; + + /// Additional information in the form of a string. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string AdditionalContext { get => this._additionalContext; set => this._additionalContext = value; } + + /// Backing field for property. + private string _issueSummary; + + /// Describe the issue with the affected resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string IssueSummary { get => this._issueSummary; set => this._issueSummary = value; } + + /// Backing field for property. + private string _resourceId; + + /// Provide resourceId of affected resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private string _serviceId; + + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ServiceId { get => this._serviceId; set => this._serviceId = value; } + + /// Creates an new instance. + public DiscoveryNlpRequest() + { + + } + } + /// Discover NLP request. + public partial interface IDiscoveryNlpRequest : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Additional information in the form of a string. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information in the form of a string.", + SerializedName = @"additionalContext", + PossibleTypes = new [] { typeof(string) })] + string AdditionalContext { get; set; } + /// Describe the issue with the affected resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describe the issue with the affected resource.", + SerializedName = @"issueSummary", + PossibleTypes = new [] { typeof(string) })] + string IssueSummary { get; set; } + /// Provide resourceId of affected resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provide resourceId of affected resource", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + string ServiceId { get; set; } + + } + /// Discover NLP request. + internal partial interface IDiscoveryNlpRequestInternal + + { + /// Additional information in the form of a string. + string AdditionalContext { get; set; } + /// Describe the issue with the affected resource. + string IssueSummary { get; set; } + /// Provide resourceId of affected resource + string ResourceId { get; set; } + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + string ServiceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs new file mode 100644 index 000000000000..b2d2900211c8 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Discover NLP request. + public partial class DiscoveryNlpRequest + { + + /// + /// 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 DiscoveryNlpRequest(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_issueSummary = If( json?.PropertyT("issueSummary"), out var __jsonIssueSummary) ? (string)__jsonIssueSummary : (string)IssueSummary;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} + {_additionalContext = If( json?.PropertyT("additionalContext"), out var __jsonAdditionalContext) ? (string)__jsonAdditionalContext : (string)AdditionalContext;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryNlpRequest(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._issueSummary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._issueSummary.ToString()) : null, "issueSummary" ,container.Add ); + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != (((object)this._serviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._serviceId.ToString()) : null, "serviceId" ,container.Add ); + AddIf( null != (((object)this._additionalContext)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._additionalContext.ToString()) : null, "additionalContext" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs new file mode 100644 index 000000000000..236f747354f4 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Discovery Nlp response. + [System.ComponentModel.TypeConverter(typeof(DiscoveryNlpResponseTypeConverter))] + public partial class DiscoveryNlpResponse + { + + /// + /// 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.Api20240301Preview.IDiscoveryNlpResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DiscoveryNlpResponse(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.Api20240301Preview.IDiscoveryNlpResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DiscoveryNlpResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DiscoveryNlpResponse(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.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResourceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DiscoveryNlpResponse(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.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResourceTypeConverter.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.Api20240301Preview.IDiscoveryNlpResponse 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 Nlp response. + [System.ComponentModel.TypeConverter(typeof(DiscoveryNlpResponseTypeConverter))] + public partial interface IDiscoveryNlpResponse + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.TypeConverter.cs new file mode 100644 index 000000000000..2010d83bc29c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DiscoveryNlpResponseTypeConverter : 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.Api20240301Preview.IDiscoveryNlpResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DiscoveryNlpResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DiscoveryNlpResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DiscoveryNlpResponse.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs new file mode 100644 index 000000000000..f1f695d2b414 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Discovery Nlp response. + public partial class DiscoveryNlpResponse : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] _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.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DiscoveryNlpResponse() + { + + } + } + /// Discovery Nlp response. + public partial interface IDiscoveryNlpResponse : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// 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.Api20240301Preview.ISolutionNlpMetadataResource) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get; set; } + + } + /// Discovery Nlp response. + internal partial interface IDiscoveryNlpResponseInternal + + { + /// The list of solution metadata. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.json.cs new file mode 100644 index 000000000000..2877c42c5e61 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Discovery Nlp response. + public partial class DiscoveryNlpResponse + { + + /// + /// 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 DiscoveryNlpResponse(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.Api20240301Preview.ISolutionNlpMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryNlpResponse(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); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs index 16bf28929c76..f03b7470da41 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class DiscoveryResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiscoveryResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiscoveryResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal DiscoveryResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal DiscoveryResponse(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal DiscoveryResponse(global::System.Management.Automation.PSObject content /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs index 79200535424e..f031e5fce8de 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs similarity index 88% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs index 18188ad01669..5710cf617b39 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Discovery response. public partial class DiscoveryResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class DiscoveryResponse : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] _value; /// The list of metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public DiscoveryResponse() @@ -51,8 +51,8 @@ public partial interface IDiscoveryResponse : ReadOnly = false, Description = @"The list of metadata.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] Value { get; set; } } /// Discovery response. @@ -62,7 +62,7 @@ internal partial interface IDiscoveryResponseInternal /// The link used to get the next page of solution metadata. string NextLink { get; set; } /// The list of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] Value { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs index 480670ceb398..0c919f7f8210 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/DiscoveryResponse.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DiscoveryResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.J { 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.Api20230901Preview.ISolutionMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataResource.FromJson(__u) )) ))() : null : Value;} + {_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.Api20240301Preview.ISolutionMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IDiscoveryResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs similarity index 83% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs index 690a325e72f8..d2a00537f318 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Error partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Error(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Error(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,25 +104,25 @@ internal Error(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -137,19 +137,19 @@ internal Error(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -159,7 +159,7 @@ internal Error(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs index 0aa445cea7f7..f800e79e8ea3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs index 0d36ca767065..4bc4267486a5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Error definition. public partial class Error : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal { /// Backing field for property. @@ -23,13 +23,13 @@ public partial class Error : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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.Api20230901Preview.IError[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. private string _message; @@ -39,13 +39,13 @@ public partial class Error : public string Message { get => this._message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IErrorInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -84,8 +84,8 @@ public partial interface IError : 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.Api20230901Preview.IError) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } /// Description of the error. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -117,7 +117,7 @@ internal partial interface IErrorInternal /// /// An array of additional nested error response info objects, as described by this contract. /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } /// Description of the error. string Message { get; set; } /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs index 216edd3519cc..6622e9eea563 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Error.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -68,18 +68,18 @@ internal Error(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObje {_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.Api20230901Preview.IError) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Error.FromJson(__u) )) ))() : null : Detail;} + {_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.Api20240301Preview.IError) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs index f1d021a073a6..ed0540362e96 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Filter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Filter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Filter(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,21 +104,21 @@ internal Filter(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value, global::System.Convert.ToString); } if (content.Contains("Operator")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,15 +133,15 @@ internal Filter(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value, global::System.Convert.ToString); } if (content.Contains("Operator")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -151,7 +151,7 @@ internal Filter(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs index 3302e0180e72..9019d0245220 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs index 1a151501ba84..1c03b1c86be5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Filter criterion public partial class Filter : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs index 0c2fd0dfbb53..6abe99742da3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Filter.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -72,13 +72,13 @@ internal Filter(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObj } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Filter(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs index 1102415285a0..d26d3122e898 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class FilterGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FilterGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FilterGroup(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,13 +104,13 @@ internal FilterGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Filter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -125,7 +125,7 @@ internal FilterGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Filter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -135,7 +135,7 @@ internal FilterGroup(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs index fce4ebea2c65..607323d70c07 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs similarity index 85% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs index d3700bc8f54c..a8e59a61ce1c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs @@ -3,22 +3,22 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Filter group public partial class FilterGroup : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] _filter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] _filter; /// List of filters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] Filter { get => this._filter; set => this._filter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get => this._filter; set => this._filter = value; } /// Creates an new instance. public FilterGroup() @@ -36,8 +36,8 @@ public partial interface IFilterGroup : ReadOnly = false, Description = @"List of filters", SerializedName = @"filter", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] Filter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get; set; } } /// Filter group @@ -45,7 +45,7 @@ internal partial interface IFilterGroupInternal { /// List of filters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] Filter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs similarity index 94% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs index 964f6b31fa28..ab3852985917 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/FilterGroup.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,18 +65,18 @@ internal FilterGroup(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Js { return; } - {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? If( __jsonFilter 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.Api20230901Preview.IFilter) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Filter.FromJson(__u) )) ))() : null : Filter;} + {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? If( __jsonFilter 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.Api20240301Preview.IFilter) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter.FromJson(__u) )) ))() : null : Filter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new FilterGroup(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs index 9e06e7bb5e02..8656be58f08d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Insight partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Insight(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Insight(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal Insight(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("ImportanceLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal Insight(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("ImportanceLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs index 262706fbd7a4..7949ee11f0c0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs index d20deb3e3b82..73e1ae8b347d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Detailed insights(s) obtained via the invocation of an insight diagnostic public partial class Insight : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsightInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs index c1e59c4857d2..37266f96526c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Insight.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Insight 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.Api20230901Preview.IInsight. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs similarity index 79% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs index 1bf62e43546b..94c69992a8af 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class MetricsBasedChart partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MetricsBasedChart(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MetricsBasedChart(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,37 +111,37 @@ internal MetricsBasedChart(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("FilterGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterGroupTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroupTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AggregationType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); } if (content.Contains("TimeSpanDuration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("FilterGroupFilter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,31 +156,31 @@ internal MetricsBasedChart(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("FilterGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterGroupTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroupTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AggregationType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); } if (content.Contains("TimeSpanDuration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("FilterGroupFilter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs index facd75328644..06c8e9bf9a0a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs index 77fbefc925ff..d6c0084c6f6f 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solutions metrics based chart public partial class MetricsBasedChart : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal { /// Backing field for property. @@ -21,18 +21,18 @@ public partial class MetricsBasedChart : public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? AggregationType { get => this._aggregationType; set => this._aggregationType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup _filterGroup; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup _filterGroup; /// Filter group [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterGroup()); set => this._filterGroup = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup()); set => this._filterGroup = value; } /// List of filters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] FilterGroupFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)FilterGroup).Filter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroupInternal)FilterGroup).Filter = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)FilterGroup).Filter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)FilterGroup).Filter = value ?? null /* arrayOf */; } /// Internal Acessors for FilterGroup - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChartInternal.FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterGroup()); set { {_filterGroup = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal.FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup()); set { {_filterGroup = value;} } } /// Backing field for property. private string _name; @@ -86,8 +86,8 @@ public partial interface IMetricsBasedChart : ReadOnly = false, Description = @"List of filters", SerializedName = @"filter", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] FilterGroupFilter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get; set; } /// Chart name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -129,9 +129,9 @@ internal partial interface IMetricsBasedChartInternal /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? AggregationType { get; set; } /// Filter group - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilterGroup FilterGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FilterGroup { get; set; } /// List of filters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IFilter[] FilterGroupFilter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get; set; } /// Chart name string Name { get; set; } /// Place holder used in HTML Content replace control with the content diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs index 877b4fd88a27..e5446899cd5a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/MetricsBasedChart.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class MetricsBasedChart 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.Api20230901Preview.IMetricsBasedChart. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new MetricsBasedChart(json) : null; } @@ -77,7 +77,7 @@ internal MetricsBasedChart(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.J { return; } - {_filterGroup = If( json?.PropertyT("filterGroup"), out var __jsonFilterGroup) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.FilterGroup.FromJson(__jsonFilterGroup) : FilterGroup;} + {_filterGroup = If( json?.PropertyT("filterGroup"), out var __jsonFilterGroup) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup.FromJson(__jsonFilterGroup) : FilterGroup;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_aggregationType = If( json?.PropertyT("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType;} {_timeSpanDuration = If( json?.PropertyT("timeSpanDuration"), out var __jsonTimeSpanDuration) ? (string)__jsonTimeSpanDuration : (string)TimeSpanDuration;} diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.PowerShell.cs new file mode 100644 index 000000000000..4ed16ec4c254 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Nlp metadata. + [System.ComponentModel.TypeConverter(typeof(NlpSolutionsTypeConverter))] + public partial class NlpSolutions + { + + /// + /// 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.Api20240301Preview.INlpSolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NlpSolutions(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.Api20240301Preview.INlpSolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NlpSolutions(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.Api20240301Preview.INlpSolutions 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 NlpSolutions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NlpSolutions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Nlp metadata. + [System.ComponentModel.TypeConverter(typeof(NlpSolutionsTypeConverter))] + public partial interface INlpSolutions + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.TypeConverter.cs new file mode 100644 index 000000000000..3266bb4e9c58 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class NlpSolutionsTypeConverter : 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.Api20240301Preview.INlpSolutions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return NlpSolutions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return NlpSolutions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return NlpSolutions.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.cs new file mode 100644 index 000000000000..bc3299154341 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Nlp metadata. + public partial class NlpSolutions : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal + { + + /// Backing field for property. + private string _problemClassificationId; + + /// Problem Classification Id that is having the issue + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ProblemClassificationId { get => this._problemClassificationId; set => this._problemClassificationId = value; } + + /// Backing field for property. + private string _problemDescription; + + /// Description for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ProblemDescription { get => this._problemDescription; set => this._problemDescription = value; } + + /// Backing field for property. + private string _problemTitle; + + /// Title for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ProblemTitle { get => this._problemTitle; set => this._problemTitle = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] _relatedService; + + /// 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.Api20240301Preview.IClassificationService[] RelatedService { get => this._relatedService; set => this._relatedService = value; } + + /// Backing field for property. + private string _serviceId; + + /// Service resource id that is having the problem + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ServiceId { get => this._serviceId; set => this._serviceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] _solution; + + /// 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.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => this._solution; set => this._solution = value; } + + /// Creates an new instance. + public NlpSolutions() + { + + } + } + /// Nlp metadata. + public partial interface INlpSolutions : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Problem Classification Id that is having the issue + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Problem Classification Id that is having the issue", + SerializedName = @"problemClassificationId", + PossibleTypes = new [] { typeof(string) })] + string ProblemClassificationId { get; set; } + /// Description for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description for given ProblemClassificationId", + SerializedName = @"problemDescription", + PossibleTypes = new [] { typeof(string) })] + string ProblemDescription { get; set; } + /// Title for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Title for given ProblemClassificationId", + SerializedName = @"problemTitle", + PossibleTypes = new [] { typeof(string) })] + string ProblemTitle { 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 = @"relatedServices", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + /// Service resource id that is having the problem + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service resource id that is having the problem", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + string ServiceId { 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 = @"solutions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + + } + /// Nlp metadata. + internal partial interface INlpSolutionsInternal + + { + /// Problem Classification Id that is having the issue + string ProblemClassificationId { get; set; } + /// Description for given ProblemClassificationId + string ProblemDescription { get; set; } + /// Title for given ProblemClassificationId + string ProblemTitle { get; set; } + /// The list of solution metadata. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + /// Service resource id that is having the problem + string ServiceId { get; set; } + /// The list of solution metadata. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs new file mode 100644 index 000000000000..830c6a115b2e --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Nlp metadata. + public partial class NlpSolutions + { + + /// + /// 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.Api20240301Preview.INlpSolutions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new NlpSolutions(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 NlpSolutions(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_problemTitle = If( json?.PropertyT("problemTitle"), out var __jsonProblemTitle) ? (string)__jsonProblemTitle : (string)ProblemTitle;} + {_problemDescription = If( json?.PropertyT("problemDescription"), out var __jsonProblemDescription) ? (string)__jsonProblemDescription : (string)ProblemDescription;} + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} + {_problemClassificationId = If( json?.PropertyT("problemClassificationId"), out var __jsonProblemClassificationId) ? (string)__jsonProblemClassificationId : (string)ProblemClassificationId;} + {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions 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.Api20240301Preview.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties.FromJson(__u) )) ))() : null : Solution;} + {_relatedService = If( json?.PropertyT("relatedServices"), out var __jsonRelatedServices) ? If( __jsonRelatedServices 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.Api20240301Preview.IClassificationService) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService.FromJson(__p) )) ))() : null : RelatedService;} + 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._problemTitle)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._problemTitle.ToString()) : null, "problemTitle" ,container.Add ); + AddIf( null != (((object)this._problemDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._problemDescription.ToString()) : null, "problemDescription" ,container.Add ); + AddIf( null != (((object)this._serviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._serviceId.ToString()) : null, "serviceId" ,container.Add ); + AddIf( null != (((object)this._problemClassificationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._problemClassificationId.ToString()) : null, "problemClassificationId" ,container.Add ); + if (null != this._solution) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __x in this._solution ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("solutions",__w); + } + if (null != this._relatedService) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __s in this._relatedService ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("relatedServices",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs similarity index 71% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs index fd1a18093331..5aa650a35c1d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ReplacementMaps partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ReplacementMaps(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ReplacementMaps(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal ReplacementMaps(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("Troubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("MetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal ReplacementMaps(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("Troubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("MetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs index 1590eb071381..ba9bc88d1436 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs similarity index 79% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs index 0d90b4b84568..6dfa2277735b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs @@ -3,59 +3,59 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution replacement maps. public partial class ReplacementMaps : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] _diagnostic; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] _diagnostic; /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] Diagnostic { get => this._diagnostic; set => this._diagnostic = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get => this._diagnostic; set => this._diagnostic = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] _metricsBasedChart; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] _metricsBasedChart; /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] MetricsBasedChart { get => this._metricsBasedChart; set => this._metricsBasedChart = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get => this._metricsBasedChart; set => this._metricsBasedChart = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] _troubleshooter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] _troubleshooter; /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] Troubleshooter { get => this._troubleshooter; set => this._troubleshooter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get => this._troubleshooter; set => this._troubleshooter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] _video; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] _video; /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] Video { get => this._video; set => this._video = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get => this._video; set => this._video = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] _videoGroup; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] _videoGroup; /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] _webResult; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] _webResult; /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] WebResult { get => this._webResult; set => this._webResult = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get => this._webResult; set => this._webResult = value; } /// Creates an new instance. public ReplacementMaps() @@ -73,24 +73,24 @@ public partial interface IReplacementMaps : ReadOnly = false, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// @@ -99,24 +99,24 @@ public partial interface IReplacementMaps : ReadOnly = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] Video { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] VideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] WebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } } /// Solution replacement maps. @@ -124,19 +124,19 @@ internal partial interface IReplacementMapsInternal { /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] Video { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] VideoGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] WebResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs index 5b88d24a9307..1715bf2f98db 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ReplacementMaps.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ReplacementMaps 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.Api20230901Preview.IReplacementMaps. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ReplacementMaps(json) : null; } @@ -77,12 +77,12 @@ internal ReplacementMaps(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Jso { return; } - {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults 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.Api20230901Preview.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResult.FromJson(__u) )) ))() : null : WebResult;} - {_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.Api20230901Preview.ISolutionsDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnostic.FromJson(__p) )) ))() : null : Diagnostic;} - {_troubleshooter = If( json?.PropertyT("troubleshooters"), out var __jsonTroubleshooters) ? If( __jsonTroubleshooters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshooters.FromJson(__k) )) ))() : null : Troubleshooter;} - {_metricsBasedChart = If( json?.PropertyT("metricsBasedCharts"), out var __jsonMetricsBasedCharts) ? If( __jsonMetricsBasedCharts as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChart.FromJson(__f) )) ))() : null : MetricsBasedChart;} - {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __b) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__b, (__a)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Video.FromJson(__a) )) ))() : null : Video;} - {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___w, (___v)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroup.FromJson(___v) )) ))() : null : VideoGroup;} + {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults 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.Api20240301Preview.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult.FromJson(__u) )) ))() : null : WebResult;} + {_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.Api20240301Preview.ISolutionsDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic.FromJson(__p) )) ))() : null : Diagnostic;} + {_troubleshooter = If( json?.PropertyT("troubleshooters"), out var __jsonTroubleshooters) ? If( __jsonTroubleshooters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters.FromJson(__k) )) ))() : null : Troubleshooter;} + {_metricsBasedChart = If( json?.PropertyT("metricsBasedCharts"), out var __jsonMetricsBasedCharts) ? If( __jsonMetricsBasedCharts as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart.FromJson(__f) )) ))() : null : MetricsBasedChart;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __b) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__b, (__a)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video.FromJson(__a) )) ))() : null : Video;} + {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___w, (___v)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup.FromJson(___v) )) ))() : null : VideoGroup;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.PowerShell.cs new file mode 100644 index 000000000000..4b5834025af8 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution replacement maps. + [System.ComponentModel.TypeConverter(typeof(ReplacementMapsSelfHelpTypeConverter))] + public partial class ReplacementMapsSelfHelp + { + + /// + /// 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.Api20240301Preview.IReplacementMapsSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ReplacementMapsSelfHelp(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.Api20240301Preview.IReplacementMapsSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ReplacementMapsSelfHelp(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.Api20240301Preview.IReplacementMapsSelfHelp 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 ReplacementMapsSelfHelp(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("Video")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("VideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ReplacementMapsSelfHelp(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("Video")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("VideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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 replacement maps. + [System.ComponentModel.TypeConverter(typeof(ReplacementMapsSelfHelpTypeConverter))] + public partial interface IReplacementMapsSelfHelp + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.TypeConverter.cs new file mode 100644 index 000000000000..2bcc2cfd9cf2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ReplacementMapsSelfHelpTypeConverter : 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.Api20240301Preview.IReplacementMapsSelfHelp ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ReplacementMapsSelfHelp.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ReplacementMapsSelfHelp.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ReplacementMapsSelfHelp.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs new file mode 100644 index 000000000000..8cf64eb19b08 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution replacement maps. + public partial class ReplacementMapsSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] _video; + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get => this._video; set => this._video = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] _videoGroup; + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] _webResult; + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get => this._webResult; set => this._webResult = value; } + + /// Creates an new instance. + public ReplacementMapsSelfHelp() + { + + } + } + /// Solution replacement maps. + public partial interface IReplacementMapsSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + + } + /// Solution replacement maps. + internal partial interface IReplacementMapsSelfHelpInternal + + { + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + /// Group of Videos + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + /// Solution AzureKB results + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs new file mode 100644 index 000000000000..cd79f67c0bff --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution replacement maps. + public partial class ReplacementMapsSelfHelp + { + + /// + /// 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.Api20240301Preview.IReplacementMapsSelfHelp. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ReplacementMapsSelfHelp(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 ReplacementMapsSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults 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.Api20240301Preview.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult.FromJson(__u) )) ))() : null : WebResult;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos 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.Api20240301Preview.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video.FromJson(__p) )) ))() : null : Video;} + {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup.FromJson(__k) )) ))() : null : VideoGroup;} + 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 (null != this._webResult) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __x in this._webResult ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("webResults",__w); + } + if (null != this._video) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __s in this._video ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("videos",__r); + } + if (null != this._videoGroup) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __n in this._videoGroup ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("videoGroups",__m); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs similarity index 88% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs index 4a5d2199f778..8f5c053bb012 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ResponseOption partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResponseOption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResponseOption(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal ResponseOption(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal ResponseOption(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs index 44b52be3f0a0..930218e060a6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs index 64beb249b411..37022682bf77 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// The status of the resource. public partial class ResponseOption : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOptionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs index 2bd238599608..9ad1d8a06068 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseOption.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResponseOption 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.Api20230901Preview.IResponseOption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ResponseOption(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs similarity index 79% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs index 9156dbd3c837..cc47e4d3e0ac 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ResponseValidationProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IResponseValidationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResponseValidationProperties(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IResponseValidationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResponseValidationProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,29 @@ internal ResponseValidationProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Regex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + } + if (content.Contains("ValidationScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); } if (content.Contains("IsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); } if (content.Contains("MaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +150,23 @@ internal ResponseValidationProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Regex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + } + if (content.Contains("ValidationScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); } if (content.Contains("IsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); } if (content.Contains("MaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs index a18685e67ba4..666a3d637109 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs similarity index 78% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs index 30594254b2e4..60e3e098b013 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter step input response validation properties public partial class ResponseValidationProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal { /// Backing field for property. @@ -41,6 +41,13 @@ public partial class ResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public string ValidationErrorMessage { get => this._validationErrorMessage; set => this._validationErrorMessage = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? _validationScope; + + /// Validation scope + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get => this._validationScope; set => this._validationScope = value; } + /// Creates an new instance. public ResponseValidationProperties() { @@ -83,6 +90,14 @@ public partial interface IResponseValidationProperties : SerializedName = @"validationErrorMessage", PossibleTypes = new [] { typeof(string) })] string ValidationErrorMessage { get; set; } + /// Validation scope + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Validation scope", + SerializedName = @"validationScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get; set; } } /// Troubleshooter step input response validation properties @@ -97,6 +112,8 @@ internal partial interface IResponseValidationPropertiesInternal string Regex { get; set; } /// Validation Error Message. string ValidationErrorMessage { get; set; } + /// Validation scope + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs index 65f575d22c3b..d59750742ae5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/ResponseValidationProperties.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResponseValidationProperties 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.Api20230901Preview.IResponseValidationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ResponseValidationProperties(json) : null; } @@ -78,6 +78,7 @@ internal ResponseValidationProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHel return; } {_regex = If( json?.PropertyT("regex"), out var __jsonRegex) ? (string)__jsonRegex : (string)Regex;} + {_validationScope = If( json?.PropertyT("validationScope"), out var __jsonValidationScope) ? (string)__jsonValidationScope : (string)ValidationScope;} {_isRequired = If( json?.PropertyT("isRequired"), out var __jsonIsRequired) ? (bool?)__jsonIsRequired : IsRequired;} {_validationErrorMessage = If( json?.PropertyT("validationErrorMessage"), out var __jsonValidationErrorMessage) ? (string)__jsonValidationErrorMessage : (string)ValidationErrorMessage;} {_maxLength = If( json?.PropertyT("maxLength"), out var __jsonMaxLength) ? (long?)__jsonMaxLength : MaxLength;} @@ -104,6 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( return container; } AddIf( null != (((object)this._regex)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._regex.ToString()) : null, "regex" ,container.Add ); + AddIf( null != (((object)this._validationScope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._validationScope.ToString()) : null, "validationScope" ,container.Add ); AddIf( null != this._isRequired ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonBoolean((bool)this._isRequired) : null, "isRequired" ,container.Add ); AddIf( null != (((object)this._validationErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._validationErrorMessage.ToString()) : null, "validationErrorMessage" ,container.Add ); AddIf( null != this._maxLength ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNumber((long)this._maxLength) : null, "maxLength" ,container.Add ); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs index 6c9078366051..274d42b88167 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class RestartTroubleshooterResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.IRestartTroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RestartTroubleshooterResponse(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.IRestartTroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RestartTroubleshooterResponse(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +113,17 @@ internal RestartTroubleshooterResponse(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("TroubleshooterResourceName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +138,11 @@ internal RestartTroubleshooterResponse(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("TroubleshooterResourceName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs index e0ebff2c9304..824e5c1ebc66 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs similarity index 93% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs index 4f71d83f286a..c0d93eab6bef 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter restart response public partial class RestartTroubleshooterResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable { @@ -21,7 +21,7 @@ public partial class RestartTroubleshooterResponse : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for TroubleshooterResourceName - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal.TroubleshooterResourceName { get => this._troubleshooterResourceName; set { {_troubleshooterResourceName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal.TroubleshooterResourceName { get => this._troubleshooterResourceName; set { {_troubleshooterResourceName = value;} } } /// Backing field for property. private string _troubleshooterResourceName; @@ -35,7 +35,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable.Rea { if (headers.TryGetValues("Location", out var __locationHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponseInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs index 9d677debb9da..bc753cc33466 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/RestartTroubleshooterResponse.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RestartTroubleshooterResponse 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.Api20230901Preview.IRestartTroubleshooterResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new RestartTroubleshooterResponse(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs similarity index 82% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs index 4e4a4a9a0869..3fb83550a874 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SearchResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SearchResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SearchResult(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,41 +111,41 @@ internal SearchResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Confidence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); } if (content.Contains("Source")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); } if (content.Contains("ResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); } if (content.Contains("Rank")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Link")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -160,35 +160,35 @@ internal SearchResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Confidence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); } if (content.Contains("Source")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); } if (content.Contains("ResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); } if (content.Contains("Rank")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Link")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs index ca90a479acea..72d4376fd5fb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs similarity index 99% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs index 78102eabc7ef..ec29ada69936 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Details of an AzureKB search result. public partial class SearchResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs index 6be68a3b1be5..78d83311e64c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SearchResult.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SearchResult 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.Api20230901Preview.ISearchResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SearchResult(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs similarity index 71% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs index cfddd58d9f8e..d13be5a6a251 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Section partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Section(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Section(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,45 +111,45 @@ internal Section(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,39 +164,39 @@ internal Section(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs index 5f9c03ae5bb2..d910bf950d97 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs similarity index 77% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs index 6168244f761e..eb0b3e80d33c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Part of the solution and are dividers in the solution rendering. public partial class Section : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal { /// Backing field for property. @@ -21,40 +21,40 @@ public partial class Section : public string Content { get => this._content; set => this._content = value; } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISectionInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps()); set { {_replacementMap = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set { {_replacementMap = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps _replacementMap; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps _replacementMap; /// Solution replacement maps. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps()); set => this._replacementMap = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set => this._replacementMap = value; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } /// Backing field for property. private string _title; @@ -87,24 +87,24 @@ public partial interface ISection : ReadOnly = false, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// @@ -113,24 +113,24 @@ public partial interface ISection : ReadOnly = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// Solution sections title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -148,21 +148,21 @@ internal partial interface ISectionInternal /// Solution sections content. string Content { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// Solution sections title. string Title { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs index 3b54a6fcd594..e83530f9f3d7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Section.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Section 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.Api20230901Preview.ISection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Section(json) : null; } @@ -77,7 +77,7 @@ internal Section(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonOb { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} AfterFromJson(json); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.PowerShell.cs new file mode 100644 index 000000000000..7e67cc3027c6 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Part of the solution and are dividers in the solution rendering. + [System.ComponentModel.TypeConverter(typeof(SectionSelfHelpTypeConverter))] + public partial class SectionSelfHelp + { + + /// + /// 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.Api20240301Preview.ISectionSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SectionSelfHelp(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.Api20240301Preview.ISectionSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SectionSelfHelp(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.Api20240301Preview.ISectionSelfHelp 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 SectionSelfHelp(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SectionSelfHelp(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Part of the solution and are dividers in the solution rendering. + [System.ComponentModel.TypeConverter(typeof(SectionSelfHelpTypeConverter))] + public partial interface ISectionSelfHelp + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.TypeConverter.cs new file mode 100644 index 000000000000..f3ba4894f7df --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SectionSelfHelpTypeConverter : 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.Api20240301Preview.ISectionSelfHelp ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SectionSelfHelp.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SectionSelfHelp.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SectionSelfHelp.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.cs new file mode 100644 index 000000000000..96814c7d37db --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Part of the solution and are dividers in the solution rendering. + public partial class SectionSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal + { + + /// Backing field for property. + private string _content; + + /// Solution sections content. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Content { get => this._content; set => this._content = value; } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp _replacementMap; + + /// Solution replacement maps. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set => this._replacementMap = value; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _title; + + /// Solution sections 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 SectionSelfHelp() + { + + } + } + /// Part of the solution and are dividers in the solution rendering. + public partial interface ISectionSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Solution sections content. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution sections content.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// Solution sections title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution sections title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; set; } + + } + /// Part of the solution and are dividers in the solution rendering. + internal partial interface ISectionSelfHelpInternal + + { + /// Solution sections content. + string Content { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// Solution sections title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.json.cs new file mode 100644 index 000000000000..8037fcb26b6d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Part of the solution and are dividers in the solution rendering. + public partial class SectionSelfHelp + { + + /// + /// 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.Api20240301Preview.ISectionSelfHelp. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SectionSelfHelp(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 SectionSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : ReplacementMap;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} + 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._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,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._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs new file mode 100644 index 000000000000..d205c91fa535 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Simplified Solutions response. + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] + public partial class SimplifiedSolutionsResource + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SimplifiedSolutionsResource(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.Api20240301Preview.ISimplifiedSolutionsResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SimplifiedSolutionsResource(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.Api20240301Preview.ISimplifiedSolutionsResource 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 SimplifiedSolutionsResource(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.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SimplifiedSolutionsResource(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.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.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(); + } + } + /// Simplified Solutions response. + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] + public partial interface ISimplifiedSolutionsResource + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.TypeConverter.cs new file mode 100644 index 000000000000..6dbd02f8f802 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SimplifiedSolutionsResourceTypeConverter : 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.Api20240301Preview.ISimplifiedSolutionsResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SimplifiedSolutionsResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResource.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs new file mode 100644 index 000000000000..9c7e3e68a66b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Simplified Solutions response. + public partial class SimplifiedSolutionsResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); + + /// Additional parameter response for Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; } + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/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.Api40.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Appendix + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix = value; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).Name; } + + /// Client input parameters to run Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties _property; + + /// Simplified Solutions result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties()); set => this._property = value; } + + /// Status of Simplified Solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)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); } + + /// Solution Id to identify single Simplified Solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId = 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.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; } + + /// + /// 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.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SimplifiedSolutionsResource() + { + + } + + /// 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); + } + } + /// Simplified Solutions response. + public partial interface ISimplifiedSolutionsResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource + { + /// Additional parameter response for Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional parameter response for Simplified Solutions", + SerializedName = @"appendix", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// Client input parameters to run Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Simplified Solutions", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + /// Status of Simplified Solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of Simplified Solution provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } + /// Solution Id to identify single Simplified Solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution Id to identify single Simplified Solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; set; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Simplified Solutions response. + internal partial interface ISimplifiedSolutionsResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + { + /// Additional parameter response for Simplified Solutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Client input parameters to run Simplified Solutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + /// Simplified Solutions result + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Property { get; set; } + /// Status of Simplified Solution provisioning. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + /// Solution Id to identify single Simplified Solution. + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.json.cs new file mode 100644 index 000000000000..71f83619f6a3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Simplified Solutions response. + public partial class SimplifiedSolutionsResource + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResource(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 SimplifiedSolutionsResource(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.Api40.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..bd065968625b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Simplified Solutions result + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesTypeConverter))] + public partial class SimplifiedSolutionsResourceProperties + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SimplifiedSolutionsResourceProperties(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.Api20240301Preview.ISimplifiedSolutionsResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SimplifiedSolutionsResourceProperties(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.Api20240301Preview.ISimplifiedSolutionsResourceProperties 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 SimplifiedSolutionsResourceProperties(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SimplifiedSolutionsResourceProperties(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.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(); + } + } + /// Simplified Solutions result + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesTypeConverter))] + public partial interface ISimplifiedSolutionsResourceProperties + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs new file mode 100644 index 000000000000..9bfbf5290693 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SimplifiedSolutionsResourcePropertiesTypeConverter : 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.Api20240301Preview.ISimplifiedSolutionsResourceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SimplifiedSolutionsResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourceProperties.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs new file mode 100644 index 000000000000..b41ee41e7562 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Simplified Solutions result + public partial class SimplifiedSolutionsResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix _appendix; + + /// Additional parameter response for Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix()); } + + /// Backing field for property. + private string _content; + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Content { get => this._content; } + + /// Internal Acessors for Appendix + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix()); set { {_appendix = value;} } } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters _parameter; + + /// Client input parameters to run Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters()); set => this._parameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? _provisioningState; + + /// Status of Simplified Solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _solutionId; + + /// Solution Id to identify single Simplified Solution. + [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 _title; + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Title { get => this._title; } + + /// Creates an new instance. + public SimplifiedSolutionsResourceProperties() + { + + } + } + /// Simplified Solutions result + public partial interface ISimplifiedSolutionsResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Additional parameter response for Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional parameter response for Simplified Solutions", + SerializedName = @"appendix", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// Client input parameters to run Simplified Solutions + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Simplified Solutions", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + /// Status of Simplified Solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of Simplified Solution provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } + /// Solution Id to identify single Simplified Solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution Id to identify single Simplified Solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; set; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Simplified Solutions result + internal partial interface ISimplifiedSolutionsResourcePropertiesInternal + + { + /// Additional parameter response for Simplified Solutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Client input parameters to run Simplified Solutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + /// Status of Simplified Solution provisioning. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + /// Solution Id to identify single Simplified Solution. + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.json.cs new file mode 100644 index 000000000000..46a16fdb1a4c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Simplified Solutions result + public partial class SimplifiedSolutionsResourceProperties + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourceProperties(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 SimplifiedSolutionsResourceProperties(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;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters.FromJson(__jsonParameters) : Parameter;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_appendix = If( json?.PropertyT("appendix"), out var __jsonAppendix) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix.FromJson(__jsonAppendix) : Appendix;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.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._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._appendix ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._appendix.ToJson(null,serializationMode) : null, "appendix" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,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 ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs new file mode 100644 index 000000000000..1f88e8a7e144 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Additional parameter response for Simplified Solutions + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesAppendixTypeConverter))] + public partial class SimplifiedSolutionsResourcePropertiesAppendix + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SimplifiedSolutionsResourcePropertiesAppendix(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SimplifiedSolutionsResourcePropertiesAppendix(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix 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 SimplifiedSolutionsResourcePropertiesAppendix(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 SimplifiedSolutionsResourcePropertiesAppendix(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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 parameter response for Simplified Solutions + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesAppendixTypeConverter))] + public partial interface ISimplifiedSolutionsResourcePropertiesAppendix + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs new file mode 100644 index 000000000000..60428c0b642d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SimplifiedSolutionsResourcePropertiesAppendixTypeConverter : 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SimplifiedSolutionsResourcePropertiesAppendix.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourcePropertiesAppendix.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourcePropertiesAppendix.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.cs new file mode 100644 index 000000000000..57d5430930de --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Additional parameter response for Simplified Solutions + public partial class SimplifiedSolutionsResourcePropertiesAppendix : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendixInternal + { + + /// + /// Creates an new instance. + /// + public SimplifiedSolutionsResourcePropertiesAppendix() + { + + } + } + /// Additional parameter response for Simplified Solutions + public partial interface ISimplifiedSolutionsResourcePropertiesAppendix : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray + { + + } + /// Additional parameter response for Simplified Solutions + internal partial interface ISimplifiedSolutionsResourcePropertiesAppendixInternal + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs new file mode 100644 index 000000000000..6769183a2065 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + public partial class SimplifiedSolutionsResourcePropertiesAppendix : + 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.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.json.cs new file mode 100644 index 000000000000..a5855c35c16b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Additional parameter response for Simplified Solutions + public partial class SimplifiedSolutionsResourcePropertiesAppendix + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourcePropertiesAppendix(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 SimplifiedSolutionsResourcePropertiesAppendix(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); + } + + /// + /// 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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..da98ccccdc85 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Client input parameters to run Simplified Solutions + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesParametersTypeConverter))] + public partial class SimplifiedSolutionsResourcePropertiesParameters + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SimplifiedSolutionsResourcePropertiesParameters(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SimplifiedSolutionsResourcePropertiesParameters(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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters 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 SimplifiedSolutionsResourcePropertiesParameters(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 SimplifiedSolutionsResourcePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Client input parameters to run Simplified Solutions + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourcePropertiesParametersTypeConverter))] + public partial interface ISimplifiedSolutionsResourcePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..ef726251c8f9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SimplifiedSolutionsResourcePropertiesParametersTypeConverter : 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SimplifiedSolutionsResourcePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourcePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SimplifiedSolutionsResourcePropertiesParameters.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.cs new file mode 100644 index 000000000000..036191ac1840 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Client input parameters to run Simplified Solutions + public partial class SimplifiedSolutionsResourcePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParametersInternal + { + + /// + /// Creates an new instance. + /// + public SimplifiedSolutionsResourcePropertiesParameters() + { + + } + } + /// Client input parameters to run Simplified Solutions + public partial interface ISimplifiedSolutionsResourcePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray + { + + } + /// Client input parameters to run Simplified Solutions + internal partial interface ISimplifiedSolutionsResourcePropertiesParametersInternal + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs new file mode 100644 index 000000000000..bf0d2b27bb16 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + public partial class SimplifiedSolutionsResourcePropertiesParameters : + 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.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.json.cs new file mode 100644 index 000000000000..1df6fb580c3a --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Client input parameters to run Simplified Solutions + public partial class SimplifiedSolutionsResourcePropertiesParameters + { + + /// + /// 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.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourcePropertiesParameters(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 SimplifiedSolutionsResourcePropertiesParameters(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); + } + + /// + /// 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/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs index fe579b25b589..a7aa281d57ff 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionMetadataProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionMetadataProperties(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionMetadataProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,25 @@ internal SolutionMetadataProperties(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("SolutionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("RequiredInput")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +146,19 @@ internal SolutionMetadataProperties(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("SolutionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("RequiredInput")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs index 915a1dc962a7..dbff4be36bfe 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs similarity index 94% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs index 5b7104188ad7..6c7f8b4bf706 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Metadata Properties public partial class SolutionMetadataProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class SolutionMetadataProperties : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for RequiredInput - string[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal.RequiredInput { get => this._requiredInput; set { {_requiredInput = value;} } } + string[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.RequiredInput { get => this._requiredInput; set { {_requiredInput = value;} } } /// Internal Acessors for SolutionType - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataPropertiesInternal.SolutionType { get => this._solutionType; set { {_solutionType = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.SolutionType { get => this._solutionType; set { {_solutionType = value;} } } /// Backing field for property. private string[] _requiredInput; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs index ed20d3485fcc..7d437cff1d7a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataProperties.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionMetadataProperties 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.Api20230901Preview.ISolutionMetadataProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs index 1b916a80aae1..6cd2b8c9e7e7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionMetadataResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionMetadataResource(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionMetadataResource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,7 +113,7 @@ internal SolutionMetadataResource(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -157,13 +157,13 @@ internal SolutionMetadataResource(global::System.Collections.IDictionary content } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -178,7 +178,7 @@ internal SolutionMetadataResource(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -222,7 +222,7 @@ internal SolutionMetadataResource(global::System.Management.Automation.PSObject } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs index 33660cfecf29..fe47c9f43e7d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs similarity index 92% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs index 3f30198e7d21..740bcb89d2e4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Metadata resource public partial class SolutionMetadataResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// @@ -25,7 +25,7 @@ public partial class SolutionMetadataResource : public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Solutions()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions()); set { {_property = value;} } } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } @@ -44,15 +44,15 @@ public partial class SolutionMetadataResource : public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions _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.Api20230901Preview.ISolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Solutions()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions()); set => this._property = value; } /// List of metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -119,8 +119,8 @@ public partial interface ISolutionMetadataResource : ReadOnly = false, Description = @"List of metadata.", SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } } /// Metadata resource @@ -128,9 +128,9 @@ internal partial interface ISolutionMetadataResourceInternal : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal { /// Solution metadata Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Property { get; set; } /// List of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs index 5aa1689f6b0b..ffd8aa69bc5d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionMetadataResource.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionMetadataResource 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.Api20230901Preview.ISolutionMetadataResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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; } @@ -78,7 +78,7 @@ internal SolutionMetadataResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Solutions.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs new file mode 100644 index 000000000000..4b5cb7cdc918 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Nlp Metadata resource + [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] + public partial class SolutionNlpMetadataResource + { + + /// + /// 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.Api20240301Preview.ISolutionNlpMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionNlpMetadataResource(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.Api20240301Preview.ISolutionNlpMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionNlpMetadataResource(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.Api20240301Preview.ISolutionNlpMetadataResource 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 SolutionNlpMetadataResource(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.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutionsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionNlpMetadataResource(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.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutionsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Nlp Metadata resource + [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] + public partial interface ISolutionNlpMetadataResource + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.TypeConverter.cs new file mode 100644 index 000000000000..f822569f67e9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SolutionNlpMetadataResourceTypeConverter : 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.Api20240301Preview.ISolutionNlpMetadataResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SolutionNlpMetadataResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SolutionNlpMetadataResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SolutionNlpMetadataResource.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs new file mode 100644 index 000000000000..5f1b5f4f35e9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Nlp Metadata resource + public partial class SolutionNlpMetadataResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/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.Api40.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).Name; } + + /// Problem Classification Id that is having the issue + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProblemClassificationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemClassificationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemClassificationId = value ?? null; } + + /// Description for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProblemDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemDescription = value ?? null; } + + /// Title for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProblemTitle { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemTitle; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemTitle = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions _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.Api20240301Preview.INlpSolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions()); set => this._property = value; } + + /// The list of solution metadata. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).RelatedService; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).RelatedService = value ?? null /* arrayOf */; } + + /// Service resource id that is having the problem + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ServiceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ServiceId = value ?? null; } + + /// The list of solution metadata. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } + + /// + /// 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.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SolutionNlpMetadataResource() + { + + } + + /// 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); + } + } + /// Nlp Metadata resource + public partial interface ISolutionNlpMetadataResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource + { + /// Problem Classification Id that is having the issue + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Problem Classification Id that is having the issue", + SerializedName = @"problemClassificationId", + PossibleTypes = new [] { typeof(string) })] + string ProblemClassificationId { get; set; } + /// Description for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description for given ProblemClassificationId", + SerializedName = @"problemDescription", + PossibleTypes = new [] { typeof(string) })] + string ProblemDescription { get; set; } + /// Title for given ProblemClassificationId + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Title for given ProblemClassificationId", + SerializedName = @"problemTitle", + PossibleTypes = new [] { typeof(string) })] + string ProblemTitle { 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 = @"relatedServices", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + /// Service resource id that is having the problem + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service resource id that is having the problem", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + string ServiceId { 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 = @"solutions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + + } + /// Nlp Metadata resource + internal partial interface ISolutionNlpMetadataResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + { + /// Problem Classification Id that is having the issue + string ProblemClassificationId { get; set; } + /// Description for given ProblemClassificationId + string ProblemDescription { get; set; } + /// Title for given ProblemClassificationId + string ProblemTitle { get; set; } + /// Solution metadata Resource properties. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions Property { get; set; } + /// The list of solution metadata. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + /// Service resource id that is having the problem + string ServiceId { get; set; } + /// The list of solution metadata. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.json.cs new file mode 100644 index 000000000000..01f4b731ff87 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Nlp Metadata resource + public partial class SolutionNlpMetadataResource + { + + /// + /// 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.Api20240301Preview.ISolutionNlpMetadataResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionNlpMetadataResource(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 SolutionNlpMetadataResource(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.Api40.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions.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/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs similarity index 69% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs index 9cfb2e7fd4e3..4aec9d66476a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - /// Solution response. + /// Solution PatchRequest body [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] public partial class SolutionPatchRequestBody { @@ -63,29 +63,29 @@ public partial class SolutionPatchRequestBody partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionPatchRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionPatchRequestBody(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionPatchRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionPatchRequestBody(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,69 +113,69 @@ internal SolutionPatchRequestBody(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -190,63 +190,63 @@ internal SolutionPatchRequestBody(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -268,7 +268,7 @@ public override string ToString() return ToJsonString(); } } - /// Solution response. + /// Solution PatchRequest body [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] public partial interface ISolutionPatchRequestBody diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs index 11a80a3efc56..86797ea2c1a4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs similarity index 65% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs index 4504cc359bd5..3273fcbefff6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs @@ -3,82 +3,97 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Solution response. + /// Solution PatchRequest body public partial class SolutionPatchRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal { /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Content = value ?? null; } + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBodyInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } + + /// Internal Acessors for Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section = value; } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title = value; } /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties _property; /// Solution result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set => this._property = value; } /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState)""); } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Section = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; } /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value ?? null; } + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Title = value ?? null; } + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; } /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } /// Creates an new instance. public SolutionPatchRequestBody() @@ -86,58 +101,58 @@ public SolutionPatchRequestBody() } } - /// Solution response. + /// Solution PatchRequest body public partial interface ISolutionPatchRequestBody : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable { /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] - string Content { get; set; } + string Content { get; } /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Status of solution provisioning.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// @@ -146,94 +161,94 @@ public partial interface ISolutionPatchRequestBody : ReadOnly = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"List of section object.", SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Solution Id to identify single solution.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; set; } + string SolutionId { get; } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] - string Title { get; set; } + string Title { get; } /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } - /// Solution response. + /// Solution PatchRequest body internal partial interface ISolutionPatchRequestBodyInternal { /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Solution result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get; set; } /// Status of solution provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } /// Solution Id to identify single solution. string SolutionId { get; set; } /// The title. string Title { get; set; } /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs index 407529db950e..0ef60ee24088 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionPatchRequestBody.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs @@ -3,11 +3,11 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Solution response. + /// Solution PatchRequest body public partial class SolutionPatchRequestBody { @@ -54,13 +54,13 @@ public partial class SolutionPatchRequestBody 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.Api20230901Preview.ISolutionPatchRequestBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionPatchRequestBody(json) : null; } @@ -77,7 +77,7 @@ internal SolutionPatchRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs similarity index 54% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs index a3c44aa4b67b..65b684d9f3e2 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SolutionResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionResource(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,85 +111,113 @@ internal SolutionResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Id")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Type")) + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api20230901Preview.ISolutionResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -204,79 +232,107 @@ internal SolutionResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Id")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Type")) + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api20230901Preview.ISolutionResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs index ef28968ba453..8cb36bbcae58 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs similarity index 53% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs index e2dd4ac351cd..85f5025a19b1 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs @@ -3,27 +3,31 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution response. public partial class SolutionResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Content = value ?? null; } + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; } - /// Backing field for property. - private string _id; - - /// Full resource uri of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Id { get => this._id; } + /// + /// Fully qualified resource ID for the resource. E.g. "/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.Api40.IResourceInternal)__resource).Id; } /// Backing field for property. private string _location; @@ -31,68 +35,83 @@ public partial class SolutionResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public string Location { get => this._location; set => this._location = value; } - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal.Name { get => this._name; set { {_name = value;} } } + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal.Type { get => this._type; set { {_type = value;} } } + /// Internal Acessors for Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section = value; } - /// Backing field for property. - private string _name; + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value; } - /// Resource name. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Name { get => this._name; } + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).Name; } /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties _property; /// Solution result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set => this._property = value; } /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState)""); } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] @@ -100,33 +119,62 @@ public partial class SolutionResource : /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Section = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; } /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value ?? null; } + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; } + + /// + /// 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.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).Title = value ?? null; } + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; } /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } - - /// Backing field for property. - private string _type; + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } - /// Type of resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Type { get => this._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.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } /// void Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) { if (headers.TryGetValues("Location", out var __locationHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; } } @@ -135,27 +183,32 @@ public SolutionResource() { } + + /// 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 response. public partial interface ISolutionResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource { /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] - string Content { get; set; } - /// Full resource uri of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Full resource uri of the resource.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } + string Content { get; } [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -164,54 +217,46 @@ public partial interface ISolutionResource : SerializedName = @"Location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } - /// Resource name. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource name.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Status of solution provisioning.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// @@ -220,110 +265,96 @@ public partial interface ISolutionResource : ReadOnly = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"List of section object.", SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Solution Id to identify single solution.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; set; } + string SolutionId { get; } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] - string Title { get; set; } + string Title { get; } /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - /// Type of resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Type of resource.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } /// Solution response. - internal partial interface ISolutionResourceInternal - + internal partial interface ISolutionResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal { /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } - /// Full resource uri of the resource. - string Id { get; set; } string Location { get; set; } - /// Resource name. - string Name { get; set; } /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Solution result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get; set; } /// Status of solution provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } /// Solution Id to identify single solution. string SolutionId { get; set; } /// The title. string Title { get; set; } /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - /// Type of resource. - string Type { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs similarity index 76% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs index ffe7e67a25ef..8590f7857dab 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResource.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResource 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.Api20230901Preview.ISolutionResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResource(json) : null; } @@ -77,10 +77,8 @@ internal SolutionResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -103,19 +101,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { 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 ); - 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._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._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 ); - } AfterToJson(ref container); return container; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs similarity index 71% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs index ced9f980bc3c..ce70485b67fc 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionResourceProperties(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionResourceProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,65 +113,65 @@ internal SolutionResourceProperties(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -186,59 +186,59 @@ internal SolutionResourceProperties(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("TriggerCriterion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs index 6db1c871ed68..d7b43fca1b1d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs similarity index 71% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs index 527b300fd4ad..0d5e99c62c2e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution result public partial class SolutionResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal { /// Backing field for property. @@ -18,85 +18,100 @@ public partial class SolutionResourceProperties : /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Content { get => this._content; set => this._content = value; } + public string Content { get => this._content; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps()); set { {_replacementMap = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set { {_replacementMap = value;} } } + + /// Internal Acessors for Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Section { get => this._section; set { {_section = value;} } } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters _parameter; /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters()); set => this._parameter = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? _provisioningState; /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps _replacementMap; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps _replacementMap; /// Solution replacement maps. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps()); set => this._replacementMap = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] _section; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] _section; /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => this._section; set => this._section = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => this._section; } /// Backing field for property. private string _solutionId; /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string SolutionId { get => this._solutionId; set => this._solutionId = value; } + public string SolutionId { get => this._solutionId; } /// Backing field for property. private string _title; /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Title { get => this._title; set => this._title = value; } + public string Title { get => this._title; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] _triggerCriterion; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] _triggerCriterion; /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => this._triggerCriterion; set => this._triggerCriterion = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => this._triggerCriterion; set => this._triggerCriterion = value; } /// Creates an new instance. public SolutionResourceProperties() @@ -111,51 +126,51 @@ public partial interface ISolutionResourceProperties : /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] - string Content { get; set; } + string Content { get; } /// Client input parameters to run Solution [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Status of solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Status of solution provisioning.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// @@ -164,56 +179,56 @@ public partial interface ISolutionResourceProperties : ReadOnly = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"List of section object.", SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } /// Solution Id to identify single solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"Solution Id to identify single solution.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; set; } + string SolutionId { get; } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] - string Title { get; set; } + string Title { get; } /// Solution request trigger criteria [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } /// Solution result @@ -223,33 +238,33 @@ internal partial interface ISolutionResourcePropertiesInternal /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } /// Status of solution provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IReplacementMaps ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } /// Solution Id to identify single solution. string SolutionId { get; set; } /// The title. string Title { get; set; } /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs similarity index 73% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs index 7c22ff3d3a5b..2a144012ac22 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourceProperties.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResourceProperties 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.Api20230901Preview.ISolutionResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourceProperties(json) : null; } @@ -77,14 +77,14 @@ internal SolutionResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp. { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} - {_triggerCriterion = If( json?.PropertyT("triggerCriteria"), out var __jsonTriggerCriteria) ? If( __jsonTriggerCriteria 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.Api20230901Preview.ITriggerCriterion) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TriggerCriterion.FromJson(__u) )) ))() : null : TriggerCriterion;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParameters.FromJson(__jsonParameters) : Parameter;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} + {_triggerCriterion = If( json?.PropertyT("triggerCriteria"), out var __jsonTriggerCriteria) ? If( __jsonTriggerCriteria 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.Api20240301Preview.ITriggerCriterion) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion.FromJson(__u) )) ))() : null : TriggerCriterion;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters.FromJson(__jsonParameters) : Parameter;} {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} - {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections 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.Api20230901Preview.ISection) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Section.FromJson(__p) )) ))() : null : Section;} + {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections 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.Api20240301Preview.ISection) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section.FromJson(__p) )) ))() : null : Section;} AfterFromJson(json); } @@ -107,7 +107,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - AddIf( null != this._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,container.Add ); + } if (null != this._triggerCriterion) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); @@ -118,18 +121,33 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( container.Add("triggerCriteria",__w); } AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,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._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 ); - 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._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); - if (null != this._section) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + 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)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) { - var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); - foreach( var __s in this._section ) + if (null != this._section) { - AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + var __r = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __s in this._section ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("sections",__r); } - container.Add("sections",__r); } AfterToJson(ref container); return container; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs similarity index 93% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs index 14d8be0e5e61..0d2214be0dd0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionResourcePropertiesParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionResourcePropertiesParameters(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionResourcePropertiesParameters(content); } @@ -97,10 +97,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -119,7 +119,7 @@ internal SolutionResourcePropertiesParameters(global::System.Collections.IDictio } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs index 7f298a6b1f7c..597707b1bc08 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs index 88f5a1304668..27cd4c60d2a3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Client input parameters to run Solution public partial class SolutionResourcePropertiesParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParametersInternal { /// Creates an new instance. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.dictionary.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs index 2d313f89f556..95101a730a01 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.dictionary.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResourcePropertiesParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs index a743f50f1da3..c97f7d028eb7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionResourcePropertiesParameters.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResourcePropertiesParameters 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.Api20230901Preview.ISolutionResourcePropertiesParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourcePropertiesParameters(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.PowerShell.cs new file mode 100644 index 000000000000..80df59830e19 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.PowerShell.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Self Help Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] + public partial class SolutionResourceSelfHelp + { + + /// + /// 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.Api20240301Preview.ISolutionResourceSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionResourceSelfHelp(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.Api20240301Preview.ISolutionResourceSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionResourceSelfHelp(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.Api20240301Preview.ISolutionResourceSelfHelp 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 SolutionResourceSelfHelp(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.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionResourceSelfHelp(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.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Self Help Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] + public partial interface ISolutionResourceSelfHelp + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.TypeConverter.cs new file mode 100644 index 000000000000..b0d13bf8407e --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SolutionResourceSelfHelpTypeConverter : 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.Api20240301Preview.ISolutionResourceSelfHelp ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SolutionResourceSelfHelp.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SolutionResourceSelfHelp.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SolutionResourceSelfHelp.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs new file mode 100644 index 000000000000..03df9f29a8e2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Self Help Solution response. + public partial class SolutionResourceSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/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.Api40.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp()); set { {_property = value;} } } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap = value; } + + /// Internal Acessors for Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section = value; } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId = value; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp _property; + + /// Solution result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp()); set => this._property = value; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + + /// 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); } + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; } + + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; } + + /// + /// 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.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; } + + /// + /// 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.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SolutionResourceSelfHelp() + { + + } + + /// 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); + } + } + /// Self Help Solution response. + public partial interface ISolutionResourceSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Self Help Solution response. + internal partial interface ISolutionResourceSelfHelpInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Solution result + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Property { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// List of section object. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; set; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.json.cs new file mode 100644 index 000000000000..332ec8295fdb --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Self Help Solution response. + public partial class SolutionResourceSelfHelp + { + + /// + /// 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.Api20240301Preview.ISolutionResourceSelfHelp. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourceSelfHelp(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 SolutionResourceSelfHelp(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.Api40.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs new file mode 100644 index 000000000000..6b49367ead43 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution WarmUpRequest body + [System.ComponentModel.TypeConverter(typeof(SolutionWarmUpRequestBodyTypeConverter))] + public partial class SolutionWarmUpRequestBody + { + + /// + /// 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.Api20240301Preview.ISolutionWarmUpRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionWarmUpRequestBody(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.Api20240301Preview.ISolutionWarmUpRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionWarmUpRequestBody(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.Api20240301Preview.ISolutionWarmUpRequestBody 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 SolutionWarmUpRequestBody(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionWarmUpRequestBody(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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 WarmUpRequest body + [System.ComponentModel.TypeConverter(typeof(SolutionWarmUpRequestBodyTypeConverter))] + public partial interface ISolutionWarmUpRequestBody + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.TypeConverter.cs new file mode 100644 index 000000000000..aed92ea4b41c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SolutionWarmUpRequestBodyTypeConverter : 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.Api20240301Preview.ISolutionWarmUpRequestBody ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SolutionWarmUpRequestBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SolutionWarmUpRequestBody.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SolutionWarmUpRequestBody.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs new file mode 100644 index 000000000000..37be4040e752 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution WarmUpRequest body + public partial class SolutionWarmUpRequestBody : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters _parameter; + + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters()); set => this._parameter = value; } + + /// Creates an new instance. + public SolutionWarmUpRequestBody() + { + + } + } + /// Solution WarmUpRequest body + public partial interface ISolutionWarmUpRequestBody : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Dictionary of ", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } + + } + /// Solution WarmUpRequest body + internal partial interface ISolutionWarmUpRequestBodyInternal + + { + /// Dictionary of + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs new file mode 100644 index 000000000000..a1a377d2712c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution WarmUpRequest body + public partial class SolutionWarmUpRequestBody + { + + /// + /// 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.Api20240301Preview.ISolutionWarmUpRequestBody. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionWarmUpRequestBody(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 SolutionWarmUpRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters.FromJson(__jsonParameters) : Parameter;} + 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._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs new file mode 100644 index 000000000000..88bd295a2359 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Dictionary of + [System.ComponentModel.TypeConverter(typeof(SolutionWarmUpRequestBodyParametersTypeConverter))] + public partial class SolutionWarmUpRequestBodyParameters + { + + /// + /// 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.Api20240301Preview.ISolutionWarmUpRequestBodyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionWarmUpRequestBodyParameters(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.Api20240301Preview.ISolutionWarmUpRequestBodyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionWarmUpRequestBodyParameters(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.Api20240301Preview.ISolutionWarmUpRequestBodyParameters 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 SolutionWarmUpRequestBodyParameters(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 SolutionWarmUpRequestBodyParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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(); + } + } + /// Dictionary of + [System.ComponentModel.TypeConverter(typeof(SolutionWarmUpRequestBodyParametersTypeConverter))] + public partial interface ISolutionWarmUpRequestBodyParameters + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs new file mode 100644 index 000000000000..b8db0576f90c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SolutionWarmUpRequestBodyParametersTypeConverter : 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.Api20240301Preview.ISolutionWarmUpRequestBodyParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SolutionWarmUpRequestBodyParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SolutionWarmUpRequestBodyParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SolutionWarmUpRequestBodyParameters.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs new file mode 100644 index 000000000000..14e8fb322725 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Dictionary of + public partial class SolutionWarmUpRequestBodyParameters : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParametersInternal + { + + /// Creates an new instance. + public SolutionWarmUpRequestBodyParameters() + { + + } + } + /// Dictionary of + public partial interface ISolutionWarmUpRequestBodyParameters : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IAssociativeArray + { + + } + /// Dictionary of + internal partial interface ISolutionWarmUpRequestBodyParametersInternal + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.dictionary.cs new file mode 100644 index 000000000000..0377f32151f3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + public partial class SolutionWarmUpRequestBodyParameters : + 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.Api20240301Preview.SolutionWarmUpRequestBodyParameters source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.json.cs new file mode 100644 index 000000000000..dfbbbd6df7fe --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Dictionary of + public partial class SolutionWarmUpRequestBodyParameters + { + + /// + /// 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.Api20240301Preview.ISolutionWarmUpRequestBodyParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionWarmUpRequestBodyParameters(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 SolutionWarmUpRequestBodyParameters(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); + } + + /// + /// 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/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs index e46ac3d54249..7549df62c097 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Solutions partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Solutions(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Solutions(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal Solutions(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal Solutions(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs index 518a69389aae..be1b7b9cdb7c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs similarity index 83% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs index e64e9a63d789..d2d76c20cb76 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs @@ -3,22 +3,22 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// List of solutions public partial class Solutions : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] _solution; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] _solution; /// List of metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get => this._solution; set => this._solution = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => this._solution; set => this._solution = value; } /// Creates an new instance. public Solutions() @@ -36,8 +36,8 @@ public partial interface ISolutions : ReadOnly = false, Description = @"List of metadata.", SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } } /// List of solutions @@ -45,7 +45,7 @@ internal partial interface ISolutionsInternal { /// List of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataProperties[] Solution { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs similarity index 94% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs index e3f6faa08fdc..67bc0cd219e3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Solutions.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Solutions 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.Api20230901Preview.ISolutions. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Solutions(json) : null; } @@ -77,7 +77,7 @@ internal Solutions(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions 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.Api20230901Preview.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionMetadataProperties.FromJson(__u) )) ))() : null : Solution;} + {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions 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.Api20240301Preview.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties.FromJson(__u) )) ))() : null : Solution;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs similarity index 76% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs index 0257fec0f711..15c90408bc7e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionsDiagnostic partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionsDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionsDiagnostic(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionsDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionsDiagnostic(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +113,37 @@ internal SolutionsDiagnostic(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); } if (content.Contains("StatusDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + } + if (content.Contains("EstimatedCompletionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); } if (content.Contains("RequiredParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -154,27 +158,31 @@ internal SolutionsDiagnostic(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); } if (content.Contains("StatusDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + } + if (content.Contains("EstimatedCompletionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); } if (content.Contains("RequiredParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs index fe101266701e..f0a9a56d349b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs similarity index 83% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs index 0175d0068aa2..ed1a727505ba 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs @@ -3,22 +3,29 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solutions Diagnostic public partial class SolutionsDiagnostic : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnosticInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal { + /// Backing field for property. + private string _estimatedCompletionTime; + + /// Diagnostics estimated completion time in minutes + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string EstimatedCompletionTime { get => this._estimatedCompletionTime; set => this._estimatedCompletionTime = value; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] _insight; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] _insight; /// Diagnostic insights [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } /// Backing field for property. private string _replacementKey; @@ -65,14 +72,22 @@ public SolutionsDiagnostic() public partial interface ISolutionsDiagnostic : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable { + /// Diagnostics estimated completion time in minutes + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Diagnostics estimated completion time in minutes", + SerializedName = @"estimatedCompletionTime", + PossibleTypes = new [] { typeof(string) })] + string EstimatedCompletionTime { get; set; } /// Diagnostic insights [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"Diagnostic insights", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// Place holder used in HTML Content replace control with the content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -119,8 +134,10 @@ public partial interface ISolutionsDiagnostic : internal partial interface ISolutionsDiagnosticInternal { + /// Diagnostics estimated completion time in minutes + string EstimatedCompletionTime { get; set; } /// Diagnostic insights - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// Place holder used in HTML Content replace control with the content string ReplacementKey { get; set; } /// Required parameters of this item diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs index 205713239faf..a454d260643e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsDiagnostic.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionsDiagnostic 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.Api20230901Preview.ISolutionsDiagnostic. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsDiagnostic(json) : null; } @@ -81,8 +81,9 @@ internal SolutionsDiagnostic(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} {_statusDetail = If( json?.PropertyT("statusDetails"), out var __jsonStatusDetails) ? (string)__jsonStatusDetails : (string)StatusDetail;} {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} + {_estimatedCompletionTime = If( json?.PropertyT("estimatedCompletionTime"), out var __jsonEstimatedCompletionTime) ? (string)__jsonEstimatedCompletionTime : (string)EstimatedCompletionTime;} {_requiredParameter = If( json?.PropertyT("requiredParameters"), out var __jsonRequiredParameters) ? If( __jsonRequiredParameters 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)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredParameter;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights 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.Api20230901Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Insight.FromJson(__p) )) ))() : null : Insight;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights 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.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__p) )) ))() : null : Insight;} AfterFromJson(json); } @@ -109,6 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( 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 ); AddIf( null != (((object)this._statusDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._statusDetail.ToString()) : null, "statusDetails" ,container.Add ); AddIf( null != (((object)this._replacementKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._replacementKey.ToString()) : null, "replacementKey" ,container.Add ); + AddIf( null != (((object)this._estimatedCompletionTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._estimatedCompletionTime.ToString()) : null, "estimatedCompletionTime" ,container.Add ); if (null != this._requiredParameter) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs new file mode 100644 index 000000000000..52964365a84a --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution result + [System.ComponentModel.TypeConverter(typeof(SolutionsResourcePropertiesSelfHelpTypeConverter))] + public partial class SolutionsResourcePropertiesSelfHelp + { + + /// + /// 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.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionsResourcePropertiesSelfHelp(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.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionsResourcePropertiesSelfHelp(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.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp 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 SolutionsResourcePropertiesSelfHelp(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionsResourcePropertiesSelfHelp(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.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 result + [System.ComponentModel.TypeConverter(typeof(SolutionsResourcePropertiesSelfHelpTypeConverter))] + public partial interface ISolutionsResourcePropertiesSelfHelp + + { + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs new file mode 100644 index 000000000000..ca458120b834 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SolutionsResourcePropertiesSelfHelpTypeConverter : 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.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SolutionsResourcePropertiesSelfHelp.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SolutionsResourcePropertiesSelfHelp.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SolutionsResourcePropertiesSelfHelp.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/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.cs new file mode 100644 index 000000000000..6f60ef5bc503 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.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.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution result + public partial class SolutionsResourcePropertiesSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal + { + + /// Backing field for property. + private string _content; + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Content { get => this._content; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Content { get => this._content; set { {_content = value;} } } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } + + /// Internal Acessors for Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Section { get => this._section; set { {_section = value;} } } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Title { get => this._title; set { {_title = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp _replacementMap; + + /// Solution replacement maps. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] _section; + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get => this._section; } + + /// Backing field for property. + private string _solutionId; + + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string SolutionId { get => this._solutionId; } + + /// Backing field for property. + private string _title; + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Title { get => this._title; } + + /// Creates an new instance. + public SolutionsResourcePropertiesSelfHelp() + { + + } + } + /// Solution result + public partial interface ISolutionsResourcePropertiesSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Solution result + internal partial interface ISolutionsResourcePropertiesSelfHelpInternal + + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + /// Group of Videos + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + /// List of section object. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; set; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs new file mode 100644 index 000000000000..93943af192fb --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution result + public partial class SolutionsResourcePropertiesSelfHelp + { + + /// + /// 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.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsResourcePropertiesSelfHelp(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 SolutionsResourcePropertiesSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : ReplacementMap;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} + {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections 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.Api20240301Preview.ISectionSelfHelp) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp.FromJson(__u) )) ))() : null : Section;} + 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._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._section) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.XNodeArray(); + foreach( var __x in this._section ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("sections",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs index 115187389f3e..4e2d6065a7bf 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SolutionsTroubleshooters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionsTroubleshooters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionsTroubleshooters(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ISolutionsTroubleshooters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionsTroubleshooters(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal SolutionsTroubleshooters(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Summary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +142,15 @@ internal SolutionsTroubleshooters(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Summary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs index 608e0c8d7d5c..ce17344424ca 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs index 5486035c5385..c3240f1685b4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooters in Solutions public partial class SolutionsTroubleshooters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshootersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs index 4da3a0c45ba2..04ec1e196cdb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/SolutionsTroubleshooters.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionsTroubleshooters 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.Api20230901Preview.ISolutionsTroubleshooters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsTroubleshooters(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs similarity index 70% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs index 8403bcc99f5a..308064a80868 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Step partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Step(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Step(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,85 +111,93 @@ internal Step(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("AutomatedCheckResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResultTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResultTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Guidance")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); } if (content.Contains("ExecutionStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); } if (content.Contains("ExecutionStatusDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); } if (content.Contains("IsLastStep")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Input")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepInputTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInputTypeConverter.ConvertFrom)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + } + if (content.Contains("AutomatedCheckResultVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); } if (content.Contains("AutomatedCheckResultsResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); } if (content.Contains("AutomatedCheckResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -204,79 +212,87 @@ internal Step(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("AutomatedCheckResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResultTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResultTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Guidance")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); } if (content.Contains("ExecutionStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); } if (content.Contains("ExecutionStatusDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); } if (content.Contains("IsLastStep")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Input")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepInputTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInputTypeConverter.ConvertFrom)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + } + if (content.Contains("AutomatedCheckResultVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); } if (content.Contains("AutomatedCheckResultsResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); } if (content.Contains("AutomatedCheckResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs index efdeb61ac2e9..54dc00238c91 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs similarity index 84% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs index 3664561563c1..91a7eeb21b57 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter step public partial class Step : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal { /// The error additional info. @@ -18,19 +18,27 @@ public partial class Step : public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult _automatedCheckResult; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult _automatedCheckResult; /// Only for AutomatedStep type [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResult()); set => this._automatedCheckResult = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult()); set => this._automatedCheckResult = value; } + + /// Status for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string AutomatedCheckResultStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Status = value ?? null; } /// Type of Result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType)""); } + + /// Version for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string AutomatedCheckResultVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Version = value ?? null; } /// Insight Article Content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string AutomatedCheckResultsResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result = value ?? null; } + public string AutomatedCheckResultsResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result = value ?? null; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] @@ -83,16 +91,16 @@ public partial class Step : public string Id { get => this._id; set => this._id = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[] _input; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] _input; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[] Input { get => this._input; set => this._input = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get => this._input; set => this._input = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] _insight; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] _insight; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } /// Backing field for property. private bool? _isLastStep; @@ -106,25 +114,25 @@ public partial class Step : public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for AutomatedCheckResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResult()); set { {_automatedCheckResult = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult()); set { {_automatedCheckResult = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] @@ -162,6 +170,14 @@ public partial interface IStep : SerializedName = @"additionalInfo", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo) })] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// Status for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status for automated check result", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string AutomatedCheckResultStatus { get; set; } /// Type of Result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -170,6 +186,14 @@ public partial interface IStep : SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType) })] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get; set; } + /// Version for automated check result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version for automated check result", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string AutomatedCheckResultVersion { get; set; } /// Insight Article Content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -240,16 +264,16 @@ public partial interface IStep : ReadOnly = false, Description = @"", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[] Input { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, Description = @"", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// is this last step of the workflow. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -299,9 +323,13 @@ internal partial interface IStepInternal /// The error additional info. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; set; } /// Only for AutomatedStep type - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IAutomatedCheckResult AutomatedCheckResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult AutomatedCheckResult { get; set; } + /// Status for automated check result + string AutomatedCheckResultStatus { get; set; } /// Type of Result. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get; set; } + /// Version for automated check result + string AutomatedCheckResultVersion { get; set; } /// Insight Article Content string AutomatedCheckResultsResult { get; set; } /// The error code. @@ -321,9 +349,9 @@ internal partial interface IStepInternal /// Unique step id. string Id { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput[] Input { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IInsight[] Insight { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } /// is this last step of the workflow. bool? IsLastStep { get; set; } /// The error message. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs index f22bdf887ed8..068a7df8a97c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Step.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Step 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.Api20230901Preview.IStep. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Step(json) : null; } @@ -77,7 +77,7 @@ internal Step(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObjec { return; } - {_automatedCheckResult = If( json?.PropertyT("automatedCheckResults"), out var __jsonAutomatedCheckResults) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.AutomatedCheckResult.FromJson(__jsonAutomatedCheckResults) : AutomatedCheckResult;} + {_automatedCheckResult = If( json?.PropertyT("automatedCheckResults"), out var __jsonAutomatedCheckResults) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult.FromJson(__jsonAutomatedCheckResults) : AutomatedCheckResult;} {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} @@ -87,8 +87,8 @@ internal Step(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObjec {_executionStatusDescription = If( json?.PropertyT("executionStatusDescription"), out var __jsonExecutionStatusDescription) ? (string)__jsonExecutionStatusDescription : (string)ExecutionStatusDescription;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} {_isLastStep = If( json?.PropertyT("isLastStep"), out var __jsonIsLastStep) ? (bool?)__jsonIsLastStep : IsLastStep;} - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs 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.Api20230901Preview.IStepInput) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepInput.FromJson(__u) )) ))() : null : Input;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights 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.Api20230901Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Insight.FromJson(__p) )) ))() : null : Insight;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs 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.Api20240301Preview.IStepInput) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput.FromJson(__u) )) ))() : null : Input;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights 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.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__p) )) ))() : null : Insight;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs similarity index 69% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs index 1079cfdf933c..b5d3566e8dc3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class StepInput partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StepInput(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StepInput(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,61 +111,69 @@ internal StepInput(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ResponseValidationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + } + if (content.Contains("QuestionTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); } if (content.Contains("QuestionContent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); } if (content.Contains("QuestionContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); } if (content.Contains("ResponseHint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); } if (content.Contains("RecommendedOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); } if (content.Contains("SelectedOptionValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); } if (content.Contains("ResponseOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseOptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOptionTypeConverter.ConvertFrom)); } if (content.Contains("ResponseValidationPropertyRegex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + } + if (content.Contains("ResponseValidationPropertyValidationScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); } if (content.Contains("ResponseValidationPropertyMaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ResponseValidationPropertyIsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResponseValidationPropertyValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -180,55 +188,63 @@ internal StepInput(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ResponseValidationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + } + if (content.Contains("QuestionTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); } if (content.Contains("QuestionContent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); } if (content.Contains("QuestionContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); } if (content.Contains("ResponseHint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); } if (content.Contains("RecommendedOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); } if (content.Contains("SelectedOptionValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); } if (content.Contains("ResponseOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseOptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOptionTypeConverter.ConvertFrom)); } if (content.Contains("ResponseValidationPropertyRegex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + } + if (content.Contains("ResponseValidationPropertyValidationScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); } if (content.Contains("ResponseValidationPropertyMaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ResponseValidationPropertyIsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResponseValidationPropertyValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs index 205b5330b14b..c8130e9ff517 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs similarity index 75% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs index 72f51873c59c..7ac4a2a83586 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs @@ -3,18 +3,18 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Details of step input. public partial class StepInput : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal { /// Internal Acessors for ResponseValidationProperty - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInputInternal.ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationProperties()); set { {_responseValidationProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal.ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties()); set { {_responseValidationProperty = value;} } } /// Backing field for property. private string _questionContent; @@ -37,12 +37,19 @@ public partial class StepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public string QuestionId { get => this._questionId; set => this._questionId = value; } + /// Backing field for property. + private string _questionTitle; + + /// Question title + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string QuestionTitle { get => this._questionTitle; set => this._questionTitle = value; } + /// Backing field for property. - private string _questionType; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? _questionType; - /// Text Input. Will be a single line input. + /// Type of Question [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string QuestionType { get => this._questionType; set => this._questionType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get => this._questionType; set => this._questionType = value; } /// Backing field for property. private string _recommendedOption; @@ -59,33 +66,37 @@ public partial class StepInput : public string ResponseHint { get => this._responseHint; set => this._responseHint = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[] _responseOption; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] _responseOption; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[] ResponseOption { get => this._responseOption; set => this._responseOption = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get => this._responseOption; set => this._responseOption = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties _responseValidationProperty; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties _responseValidationProperty; /// Troubleshooter step input response validation properties [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationProperties()); set => this._responseValidationProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties()); set => this._responseValidationProperty = value; } /// Default True [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public bool? ResponseValidationPropertyIsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired = value ?? default(bool); } + public bool? ResponseValidationPropertyIsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired = value ?? default(bool); } /// Max text input (open Ended Text). [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public long? ResponseValidationPropertyMaxLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength = value ?? default(long); } + public long? ResponseValidationPropertyMaxLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength = value ?? default(long); } /// Regex used for the input validation. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ResponseValidationPropertyRegex { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex = value ?? null; } + public string ResponseValidationPropertyRegex { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex = value ?? null; } /// Validation Error Message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ResponseValidationPropertyValidationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage = value ?? null; } + public string ResponseValidationPropertyValidationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage = value ?? null; } + + /// Validation scope + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope)""); } /// Backing field for property. private string _selectedOptionValue; @@ -128,14 +139,22 @@ public partial interface IStepInput : SerializedName = @"questionId", PossibleTypes = new [] { typeof(string) })] string QuestionId { get; set; } - /// Text Input. Will be a single line input. + /// Question title [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Text Input. Will be a single line input.", - SerializedName = @"questionType", + Description = @"Question title", + SerializedName = @"questionTitle", PossibleTypes = new [] { typeof(string) })] - string QuestionType { get; set; } + string QuestionTitle { get; set; } + /// Type of Question + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of Question", + SerializedName = @"questionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } /// Result of Automate step. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -158,8 +177,8 @@ public partial interface IStepInput : ReadOnly = false, Description = @"", SerializedName = @"responseOptions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[] ResponseOption { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get; set; } /// Default True [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -192,6 +211,14 @@ public partial interface IStepInput : SerializedName = @"validationErrorMessage", PossibleTypes = new [] { typeof(string) })] string ResponseValidationPropertyValidationErrorMessage { get; set; } + /// Validation scope + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Validation scope", + SerializedName = @"validationScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get; set; } /// Text of response that was selected. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -212,16 +239,18 @@ internal partial interface IStepInputInternal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType? QuestionContentType { get; set; } /// Use Index as QuestionId. string QuestionId { get; set; } - /// Text Input. Will be a single line input. - string QuestionType { get; set; } + /// Question title + string QuestionTitle { get; set; } + /// Type of Question + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } /// Result of Automate step. string RecommendedOption { get; set; } /// Place holder text for response hints. string ResponseHint { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseOption[] ResponseOption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get; set; } /// Troubleshooter step input response validation properties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IResponseValidationProperties ResponseValidationProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ResponseValidationProperty { get; set; } /// Default True bool? ResponseValidationPropertyIsRequired { get; set; } /// Max text input (open Ended Text). @@ -230,6 +259,8 @@ internal partial interface IStepInputInternal string ResponseValidationPropertyRegex { get; set; } /// Validation Error Message. string ResponseValidationPropertyValidationErrorMessage { get; set; } + /// Validation scope + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get; set; } /// Text of response that was selected. string SelectedOptionValue { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs similarity index 92% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs index 2bd5e0019dc7..c60494c03578 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/StepInput.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StepInput 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.Api20230901Preview.IStepInput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStepInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new StepInput(json) : null; } @@ -77,15 +77,16 @@ internal StepInput(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_responseValidationProperty = If( json?.PropertyT("responseValidationProperties"), out var __jsonResponseValidationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseValidationProperties.FromJson(__jsonResponseValidationProperties) : ResponseValidationProperty;} + {_responseValidationProperty = If( json?.PropertyT("responseValidationProperties"), out var __jsonResponseValidationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties.FromJson(__jsonResponseValidationProperties) : ResponseValidationProperty;} {_questionId = If( json?.PropertyT("questionId"), out var __jsonQuestionId) ? (string)__jsonQuestionId : (string)QuestionId;} {_questionType = If( json?.PropertyT("questionType"), out var __jsonQuestionType) ? (string)__jsonQuestionType : (string)QuestionType;} + {_questionTitle = If( json?.PropertyT("questionTitle"), out var __jsonQuestionTitle) ? (string)__jsonQuestionTitle : (string)QuestionTitle;} {_questionContent = If( json?.PropertyT("questionContent"), out var __jsonQuestionContent) ? (string)__jsonQuestionContent : (string)QuestionContent;} {_questionContentType = If( json?.PropertyT("questionContentType"), out var __jsonQuestionContentType) ? (string)__jsonQuestionContentType : (string)QuestionContentType;} {_responseHint = If( json?.PropertyT("responseHint"), out var __jsonResponseHint) ? (string)__jsonResponseHint : (string)ResponseHint;} {_recommendedOption = If( json?.PropertyT("recommendedOption"), out var __jsonRecommendedOption) ? (string)__jsonRecommendedOption : (string)RecommendedOption;} {_selectedOptionValue = If( json?.PropertyT("selectedOptionValue"), out var __jsonSelectedOptionValue) ? (string)__jsonSelectedOptionValue : (string)SelectedOptionValue;} - {_responseOption = If( json?.PropertyT("responseOptions"), out var __jsonResponseOptions) ? If( __jsonResponseOptions 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.Api20230901Preview.IResponseOption) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ResponseOption.FromJson(__u) )) ))() : null : ResponseOption;} + {_responseOption = If( json?.PropertyT("responseOptions"), out var __jsonResponseOptions) ? If( __jsonResponseOptions 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.Api20240301Preview.IResponseOption) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption.FromJson(__u) )) ))() : null : ResponseOption;} AfterFromJson(json); } @@ -111,6 +112,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( AddIf( null != this._responseValidationProperty ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._responseValidationProperty.ToJson(null,serializationMode) : null, "responseValidationProperties" ,container.Add ); AddIf( null != (((object)this._questionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._questionId.ToString()) : null, "questionId" ,container.Add ); AddIf( null != (((object)this._questionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._questionType.ToString()) : null, "questionType" ,container.Add ); + AddIf( null != (((object)this._questionTitle)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._questionTitle.ToString()) : null, "questionTitle" ,container.Add ); AddIf( null != (((object)this._questionContent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._questionContent.ToString()) : null, "questionContent" ,container.Add ); AddIf( null != (((object)this._questionContentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._questionContentType.ToString()) : null, "questionContentType" ,container.Add ); AddIf( null != (((object)this._responseHint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._responseHint.ToString()) : null, "responseHint" ,container.Add ); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs index 408685d3890d..030b1c682e40 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -66,27 +66,27 @@ public partial class TriggerCriterion partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TriggerCriterion(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TriggerCriterion(content); } @@ -96,7 +96,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -116,7 +116,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -131,17 +131,17 @@ internal TriggerCriterion(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,11 +156,11 @@ internal TriggerCriterion(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs index 0590e6a1775e..af543952b34c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs index c529a57aa76c..9fbdcf006122 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview /// PUT request. ReplacementKey is the only supported trigger type for Solution PATCH request. /// public partial class TriggerCriterion : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs index bb3599cbc145..fceab28d996b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TriggerCriterion.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class TriggerCriterion 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.Api20230901Preview.ITriggerCriterion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TriggerCriterion(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs similarity index 83% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs index 604315f35eb4..541ab43ce412 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class TroubleshooterInstanceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterInstanceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterInstanceProperties(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterInstanceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterInstanceProperties(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,25 +130,25 @@ internal TroubleshooterInstanceProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -163,19 +163,19 @@ internal TroubleshooterInstanceProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs index 965f1218b3fa..438b864794b9 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs similarity index 86% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs index a0af75448df0..8a39e4202d26 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs @@ -3,28 +3,28 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter Instance properties. public partial class TroubleshooterInstanceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal { /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Step - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal.Step { get => this._step; set { {_step = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal.Step { get => this._step; set { {_step = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters _parameter; /// Client input parameters to run Troubleshooter Resource [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters()); set => this._parameter = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? _provisioningState; @@ -41,11 +41,11 @@ public partial class TroubleshooterInstanceProperties : public string SolutionId { get => this._solutionId; set => this._solutionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] _step; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] _step; /// List of step object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get => this._step; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get => this._step; } /// Creates an new instance. public TroubleshooterInstanceProperties() @@ -63,8 +63,8 @@ public partial interface ITroubleshooterInstanceProperties : ReadOnly = false, Description = @"Client input parameters to run Troubleshooter Resource", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Status of troubleshooter provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -87,8 +87,8 @@ public partial interface ITroubleshooterInstanceProperties : ReadOnly = true, Description = @"List of step object.", SerializedName = @"steps", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; } } /// Troubleshooter Instance properties. @@ -96,13 +96,13 @@ internal partial interface ITroubleshooterInstancePropertiesInternal { /// Client input parameters to run Troubleshooter Resource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Status of troubleshooter provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; set; } /// Solution Id to identify single troubleshooter. string SolutionId { get; set; } /// List of step object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs index 461bf7c26814..f3e8cc97f3d7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstanceProperties.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterInstanceProperties 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.Api20230901Preview.ITroubleshooterInstanceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterInstanceProperties(json) : null; } @@ -119,9 +119,9 @@ internal TroubleshooterInstanceProperties(Microsoft.Azure.PowerShell.Cmdlets.Sel return; } {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParameters.FromJson(__jsonParameters) : Parameter;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters.FromJson(__jsonParameters) : Parameter;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_step = If( json?.PropertyT("steps"), out var __jsonSteps) ? If( __jsonSteps 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.Api20230901Preview.IStep) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.Step.FromJson(__u) )) ))() : null : Step;} + {_step = If( json?.PropertyT("steps"), out var __jsonSteps) ? If( __jsonSteps 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.Api20240301Preview.IStep) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step.FromJson(__u) )) ))() : null : Step;} AfterFromJson(json); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs similarity index 93% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs index 84fbffaf1aee..5b2c6a4abb90 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class TroubleshooterInstancePropertiesParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterInstancePropertiesParameters(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterInstancePropertiesParameters(content); } @@ -98,7 +98,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -118,7 +118,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -137,7 +137,7 @@ internal TroubleshooterInstancePropertiesParameters(global::System.Collections.I } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs index 0f256d235745..044036ed48ff 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs index 96a5d35299b7..74721b933869 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Client input parameters to run Troubleshooter Resource public partial class TroubleshooterInstancePropertiesParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParametersInternal { /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs index d2137eed089a..b61e89ce9462 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs index 746b3ae673d1..7445a54aad47 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterInstancePropertiesParameters.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterInstancePropertiesParameters 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.Api20230901Preview.ITroubleshooterInstancePropertiesParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterInstancePropertiesParameters(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs index 4a7e152069d8..aacd4c6bee6b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class TroubleshooterResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterResource(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterResource(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,7 +130,7 @@ internal TroubleshooterResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -174,25 +174,25 @@ internal TroubleshooterResource(global::System.Collections.IDictionary content) } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -207,7 +207,7 @@ internal TroubleshooterResource(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -251,19 +251,19 @@ internal TroubleshooterResource(global::System.Management.Automation.PSObject co } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs index d071fb5e5747..7f3cea063254 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs index c07d54380eab..10bef5e63245 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter response. public partial class TroubleshooterResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// @@ -25,13 +25,13 @@ public partial class TroubleshooterResource : public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstanceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Step - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResourceInternal.Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).Step = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step = value; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } @@ -51,18 +51,18 @@ public partial class TroubleshooterResource : /// Client input parameters to run Troubleshooter Resource [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter = value ?? null /* model class */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties _property; /// Troubleshooter Instance properties. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstanceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties()); set => this._property = value; } /// Status of troubleshooter provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] @@ -70,11 +70,11 @@ public partial class TroubleshooterResource : /// Solution Id to identify single troubleshooter. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId = value ?? null; } + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId = value ?? null; } /// List of step object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -141,8 +141,8 @@ public partial interface ITroubleshooterResource : ReadOnly = false, Description = @"Client input parameters to run Troubleshooter Resource", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Status of troubleshooter provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -165,8 +165,8 @@ public partial interface ITroubleshooterResource : ReadOnly = true, Description = @"List of step object.", SerializedName = @"steps", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; } } /// Troubleshooter response. @@ -174,15 +174,15 @@ internal partial interface ITroubleshooterResourceInternal : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal { /// Client input parameters to run Troubleshooter Resource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Troubleshooter Instance properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstanceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Property { get; set; } /// Status of troubleshooter provisioning. Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; set; } /// Solution Id to identify single troubleshooter. string SolutionId { get; set; } /// List of step object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IStep[] Step { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs index 69b21ca5a7d4..d108e0b271fa 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResource.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterResource 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.Api20230901Preview.ITroubleshooterResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterResource(json) : null; } @@ -103,7 +103,7 @@ internal TroubleshooterResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runt return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterInstanceProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs similarity index 88% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs index 6c271857ebd8..6332db8147e0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class TroubleshooterResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterResponse(content); } /// - /// Deserializes a into an instance of 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.Api20230901Preview.ITroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterResponse(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,21 +130,21 @@ internal TroubleshooterResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -159,15 +159,15 @@ internal TroubleshooterResponse(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs index 4186d592046d..f6db1b116281 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs similarity index 91% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs index eb67ee0737b1..a5b23681316b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// User Response for Troubleshooter continue request public partial class TroubleshooterResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal { /// Backing field for property. @@ -23,7 +23,7 @@ public partial class TroubleshooterResponse : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? _questionType; - /// Text Input. Will be a single line input. + /// Type of Question [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get => this._questionType; set => this._questionType = value; } @@ -54,11 +54,11 @@ public partial interface ITroubleshooterResponse : SerializedName = @"questionId", PossibleTypes = new [] { typeof(string) })] string QuestionId { get; set; } - /// Text Input. Will be a single line input. + /// Type of Question [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Text Input. Will be a single line input.", + Description = @"Type of Question", SerializedName = @"questionType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType) })] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } @@ -80,7 +80,7 @@ internal partial interface ITroubleshooterResponseInternal { /// id of the question. string QuestionId { get; set; } - /// Text Input. Will be a single line input. + /// Type of Question Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } /// /// Response key for SingleInput. For Multi-line test/open ended question it is free form text diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs index c19d3d979ba1..fab99a79a16d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/TroubleshooterResponse.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterResponse 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.Api20230901Preview.ITroubleshooterResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterResponse(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs index a863945502cc..a9bb632d9b70 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Video partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Video(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Video(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,21 +128,21 @@ internal Video(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -157,15 +157,15 @@ internal Video(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs index c4869e231cbf..375df7bdc50a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs similarity index 87% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs index 4b80f3a9360e..62cc2f4eb530 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs @@ -3,21 +3,21 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Video detail public partial class Video : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideo(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo(); /// Backing field for property. private string _replacementKey; @@ -28,11 +28,11 @@ public partial class Video : /// Link to the video [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Src { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src = value ?? null; } + public string Src { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src = value ?? null; } /// Title of the video [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title = value ?? null; } + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation @@ -55,7 +55,7 @@ public Video() /// Video detail public partial interface IVideo : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo { /// Place holder used in HTML Content replace control with the insight content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( @@ -69,7 +69,7 @@ public partial interface IVideo : } /// Video detail internal partial interface IVideoInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal { /// Place holder used in HTML Content replace control with the insight content string ReplacementKey { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs index 6537d9d89bfa..a4caae1b5f67 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/Video.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Video 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.Api20230901Preview.IVideo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Video(json) : null; } @@ -102,7 +102,7 @@ internal Video(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObje { return; } - __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideo(json); + __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo(json); {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs similarity index 85% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs index ae3b1ec5b2aa..f7f722ec98a4 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class VideoGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VideoGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VideoGroup(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal VideoGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal VideoGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs index a2a9fd699e9b..9406e13c5b1b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs index d3ffaa6c7f47..5d41be82cc92 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Video group detail public partial class VideoGroup : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class VideoGroup : public string ReplacementKey { get => this._replacementKey; set => this._replacementKey = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[] _video; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] _video; /// List of videos will be shown to customers [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[] Video { get => this._video; set => this._video = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get => this._video; set => this._video = value; } /// Creates an new instance. public VideoGroup() @@ -51,8 +51,8 @@ public partial interface IVideoGroup : ReadOnly = false, Description = @"List of videos will be shown to customers", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[] Video { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get; set; } } /// Video group detail @@ -62,7 +62,7 @@ internal partial interface IVideoGroupInternal /// Place holder used in HTML Content replace control with the insight content string ReplacementKey { get; set; } /// List of videos will be shown to customers - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo[] Video { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs index 6dfb3c65399a..9275c5b7aca2 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroup.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class VideoGroup 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.Api20230901Preview.IVideoGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new VideoGroup(json) : null; } @@ -110,7 +110,7 @@ internal VideoGroup(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Jso { return; } - {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos 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.Api20230901Preview.IVideoGroupVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.VideoGroupVideo.FromJson(__u) )) ))() : null : Video;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos 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.Api20240301Preview.IVideoGroupVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo.FromJson(__u) )) ))() : null : Video;} {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} AfterFromJson(json); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs similarity index 88% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs index f8f2fcf449a9..154a1caec5ef 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class VideoGroupVideo partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VideoGroupVideo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VideoGroupVideo(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal VideoGroupVideo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal VideoGroupVideo(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs index 78cf0711e9fd..4aa62d9f599c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs similarity index 96% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs index ac7a15e03ddd..21beb1efdd8c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// VideoGroup video detail public partial class VideoGroupVideo : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideoInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal { /// Backing field for property. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs similarity index 97% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs index 71ce1d018988..9eb1ce52c570 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/VideoGroupVideo.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class VideoGroupVideo 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.Api20230901Preview.IVideoGroupVideo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroupVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new VideoGroupVideo(json) : null; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs similarity index 84% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.PowerShell.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs index 533a96ec0e0f..b446e234fa72 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class WebResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new WebResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new WebResult(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal WebResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("SearchResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SearchResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResultTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal WebResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("SearchResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SearchResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResultTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs similarity index 98% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.TypeConverter.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs index db5e24900332..29c5aba5f6ca 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs similarity index 89% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs index 6e25621a7443..214fec0af9a5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs @@ -3,14 +3,14 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// AzureKB web result public partial class WebResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class WebResult : public string ReplacementKey { get => this._replacementKey; set => this._replacementKey = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[] _searchResult; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] _searchResult; /// AzureKB search results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[] SearchResult { get => this._searchResult; set => this._searchResult = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get => this._searchResult; set => this._searchResult = value; } /// Creates an new instance. public WebResult() @@ -51,8 +51,8 @@ public partial interface IWebResult : ReadOnly = false, Description = @"AzureKB search results", SerializedName = @"searchResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[] SearchResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get; set; } } /// AzureKB web result @@ -62,7 +62,7 @@ internal partial interface IWebResultInternal /// Place holder used in HTML Content replace control with the content string ReplacementKey { get; set; } /// AzureKB search results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISearchResult[] SearchResult { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get; set; } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs similarity index 95% rename from src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.json.cs rename to src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs index faa3e4b0cf2b..c83718717261 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20230901Preview/WebResult.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs @@ -3,7 +3,7 @@ // Code generated by 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.Api20230901Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class WebResult 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.Api20230901Preview.IWebResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new WebResult(json) : null; } @@ -111,7 +111,7 @@ internal WebResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json return; } {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} - {_searchResult = If( json?.PropertyT("searchResults"), out var __jsonSearchResults) ? If( __jsonSearchResults 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.Api20230901Preview.ISearchResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SearchResult.FromJson(__u) )) ))() : null : SearchResult;} + {_searchResult = If( json?.PropertyT("searchResults"), out var __jsonSearchResults) ? If( __jsonSearchResults 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.Api20240301Preview.ISearchResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult.FromJson(__u) )) ))() : null : SearchResult;} AfterFromJson(json); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.PowerShell.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.PowerShell.cs index 365b182ebaa7..b02404e56173 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.PowerShell.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.PowerShell.cs @@ -120,10 +120,22 @@ internal SelfHelpIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionResourceName = (string) content.GetValueForProperty("SolutionResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionResourceName, global::System.Convert.ToString); } + if (content.Contains("SimplifiedSolutionsResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SimplifiedSolutionsResourceName = (string) content.GetValueForProperty("SimplifiedSolutionsResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SimplifiedSolutionsResourceName, global::System.Convert.ToString); + } if (content.Contains("TroubleshooterName")) { ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).TroubleshooterName = (string) content.GetValueForProperty("TroubleshooterName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).TroubleshooterName, global::System.Convert.ToString); } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SubscriptionId, 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); @@ -157,10 +169,22 @@ internal SelfHelpIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionResourceName = (string) content.GetValueForProperty("SolutionResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionResourceName, global::System.Convert.ToString); } + if (content.Contains("SimplifiedSolutionsResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SimplifiedSolutionsResourceName = (string) content.GetValueForProperty("SimplifiedSolutionsResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SimplifiedSolutionsResourceName, global::System.Convert.ToString); + } if (content.Contains("TroubleshooterName")) { ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).TroubleshooterName = (string) content.GetValueForProperty("TroubleshooterName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).TroubleshooterName, global::System.Convert.ToString); } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentityInternal)this).SubscriptionId, 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); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs index e06a3e639151..ae78887f0245 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs @@ -30,11 +30,27 @@ public partial class SelfHelpIdentity : private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
[Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public string Scope { get => this._scope; set => this._scope = value; } + /// Backing field for property. + private string _simplifiedSolutionsResourceName; + + /// Simplified Solutions Resource Name. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string SimplifiedSolutionsResourceName { get => this._simplifiedSolutionsResourceName; set => this._simplifiedSolutionsResourceName = value; } + + /// Backing field for property. + private string _solutionId; + + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [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 _solutionResourceName; @@ -42,6 +58,13 @@ public partial class SelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// Backing field for property. private string _troubleshooterName; @@ -75,15 +98,33 @@ public partial interface ISelfHelpIdentity : PossibleTypes = new [] { typeof(string) })] string Id { get; set; } /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
[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.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] string Scope { get; set; } + /// Simplified Solutions Resource Name. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Simplified Solutions Resource Name.", + SerializedName = @"simplifiedSolutionsResourceName", + PossibleTypes = new [] { typeof(string) })] + string SimplifiedSolutionsResourceName { get; set; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; set; } /// Solution resource Name. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -92,6 +133,14 @@ public partial interface ISelfHelpIdentity : SerializedName = @"solutionResourceName", PossibleTypes = new [] { typeof(string) })] string SolutionResourceName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } /// Troubleshooter resource Name. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, @@ -110,11 +159,19 @@ internal partial interface ISelfHelpIdentityInternal /// Resource identity path string Id { get; set; } /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
string Scope { get; set; } + /// Simplified Solutions Resource Name. + string SimplifiedSolutionsResourceName { get; set; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + string SolutionId { get; set; } /// Solution resource Name. string SolutionResourceName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + string SubscriptionId { get; set; } /// Troubleshooter resource Name. string TroubleshooterName { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs index 94f6e9c14b03..a123a20415e3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs @@ -79,7 +79,10 @@ internal SelfHelpIdentity(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope;} {_diagnosticsResourceName = If( json?.PropertyT("diagnosticsResourceName"), out var __jsonDiagnosticsResourceName) ? (string)__jsonDiagnosticsResourceName : (string)DiagnosticsResourceName;} {_solutionResourceName = If( json?.PropertyT("solutionResourceName"), out var __jsonSolutionResourceName) ? (string)__jsonSolutionResourceName : (string)SolutionResourceName;} + {_simplifiedSolutionsResourceName = If( json?.PropertyT("simplifiedSolutionsResourceName"), out var __jsonSimplifiedSolutionsResourceName) ? (string)__jsonSimplifiedSolutionsResourceName : (string)SimplifiedSolutionsResourceName;} {_troubleshooterName = If( json?.PropertyT("troubleshooterName"), out var __jsonTroubleshooterName) ? (string)__jsonTroubleshooterName : (string)TroubleshooterName;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -106,7 +109,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( 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._solutionResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionResourceName.ToString()) : null, "solutionResourceName" ,container.Add ); + AddIf( null != (((object)this._simplifiedSolutionsResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._simplifiedSolutionsResourceName.ToString()) : null, "simplifiedSolutionsResourceName" ,container.Add ); AddIf( null != (((object)this._troubleshooterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._troubleshooterName.ToString()) : null, "troubleshooterName" ,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._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,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; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs index 525d8f7f27a9..98fa30098beb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs @@ -17,7 +17,8 @@ public partial class SelfHelp /// /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// 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 @@ -27,9 +28,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckNameAvailabilityPost(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPost(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -72,9 +73,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckNameAvailabilityPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -124,7 +125,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_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) + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_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 ) { @@ -142,7 +143,7 @@ public partial class SelfHelp 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.Api20230901Preview.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -167,7 +168,8 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// The required parameters for availability check. /// an instance that will receive events. /// @@ -185,11 +187,12 @@ public partial class SelfHelp /// /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics - /// tells you precisely the root cause of the issue and the steps to address it. You can get diagnostics once you discover - /// the relevant solution for your Azure issue.

Note: requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// 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). @@ -200,9 +203,9 @@ public partial class SelfHelp /// /// 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.Api20230901Preview.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) + public async global::System.Threading.Tasks.Task DiagnosticsCreate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -235,9 +238,9 @@ public partial class SelfHelp /// /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics - /// tells you precisely the root cause of the issue and the steps to address it. You can get diagnostics once you discover - /// the relevant solution for your Azure issue.

Note: requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. ///
/// /// The required request body for this insightResource invocation. @@ -249,9 +252,9 @@ public partial class SelfHelp /// /// 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.Api20230901Preview.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) + public async global::System.Threading.Tasks.Task DiagnosticsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -303,7 +306,7 @@ public partial class SelfHelp /// /// 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) + 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 ) { @@ -417,7 +420,7 @@ public partial class SelfHelp 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.Api20230901Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -442,14 +445,15 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// 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.Api20230901Preview.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiagnosticsCreate_Validate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -466,7 +470,8 @@ public partial class SelfHelp /// /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// 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 @@ -476,9 +481,9 @@ public partial class SelfHelp /// /// 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) + 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -517,9 +522,9 @@ public partial class SelfHelp /// /// 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) + 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -567,7 +572,7 @@ public partial class SelfHelp /// /// 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) + 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 ) { @@ -585,7 +590,7 @@ public partial class SelfHelp 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.Api20230901Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -610,7 +615,8 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Unique resource name for insight resources /// an instance that will receive events. /// @@ -631,15 +637,14 @@ public partial class SelfHelp /// /// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) /// AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies - /// relevant Azure diagnostics and solutions. We will do our best to return the most effective solutions based on the type - /// of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) - ///
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + /// relevant Azure diagnostics and solutions.

Required Input : problemClassificationId (Use the [problemClassification + /// API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri + /// OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ + /// as an input to Diagnostics and Solutions API. ///
- /// This is an extension resource provider and only resource level extension is supported at the moment. - /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional - /// 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId - /// eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' + /// and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports + /// only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' /// Skiptoken is only used if a previous operation returned a partial result. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -649,17 +654,15 @@ public partial class SelfHelp /// /// 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) + public async global::System.Threading.Tasks.Task DiscoverySolutionList(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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/discoverySolutions" + "/providers/Microsoft.Help/discoverySolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -684,15 +687,15 @@ public partial class SelfHelp /// /// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) /// AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies - /// relevant Azure diagnostics and solutions. We will do our best to return the most effective solutions based on the type - /// of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) - ///
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + /// relevant Azure diagnostics and solutions.

Required Input : problemClassificationId (Use the [problemClassification + /// API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri + /// OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ + /// as an input to Diagnostics and Solutions API. ///
/// - /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional - /// 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId - /// eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' + /// and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports + /// only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' /// Skiptoken is only used if a previous operation returned a partial result. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -702,27 +705,24 @@ public partial class SelfHelp /// /// 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) + 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // 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); + 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'"); + throw new global::System.Exception("Invalid identity for URI '/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" + "/providers/Microsoft.Help/discoverySolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -754,7 +754,7 @@ public partial class SelfHelp /// /// 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) + 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 ) { @@ -772,7 +772,7 @@ public partial class SelfHelp 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.Api20230901Preview.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -797,26 +797,26 @@ public partial class SelfHelp /// 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. - /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional - /// 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId - /// eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' + /// and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports + /// only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' /// Skiptoken is only used if a previous operation returned a partial result. /// 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) + internal async global::System.Threading.Tasks.Task DiscoverySolutionList_Validate(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. + /// Solution discovery using natural language processing. + /// The ID of the target subscription. The value must be an UUID. + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -825,15 +825,17 @@ public partial class SelfHelp /// /// 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) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -842,17 +844,22 @@ public partial class SelfHelp // generate request 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); + 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.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpSubscriptionScopePost_Call(request,onOk,onDefault,eventListener,sender); } } - /// Returns list of operations. + /// Solution discovery using natural language processing. /// + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -861,24 +868,27 @@ public partial class SelfHelp /// /// 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) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // 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); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Help/discoverSolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/operations" + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -887,16 +897,22 @@ public partial class SelfHelp // generate request 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); + 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.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpSubscriptionScopePost_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -906,7 +922,7 @@ public partial class SelfHelp /// /// 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) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_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 ) { @@ -924,7 +940,7 @@ public partial class SelfHelp 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.Api40.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -946,36 +962,28 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// + /// The ID of the target subscription. The value must be an UUID. + /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ - /// from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all - /// the relevant content to troubleshoot an Azure issue into a unified experience. Solutions include the following components - /// : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities - /// to support new solutions types in the future. Each solution type may require one or more ‘requiredParameters’ that are - /// required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some - /// of the solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ - /// from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ - /// from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ - /// from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters - ///
- /// This is an extension resource provider and only resource level extension is supported at the moment. - /// Solution resource Name. - /// The required request body for this solution resource creation. + /// Solution discovery using natural language processing. + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -984,18 +992,15 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionCreate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource 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) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/solutions/" - + global::System.Uri.EscapeDataString(solutionResourceName) + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1004,7 +1009,7 @@ public partial class SelfHelp // generate request 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); + 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; } @@ -1013,24 +1018,13 @@ public partial class SelfHelp 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.SolutionCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpTenantScopePost_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ - /// from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all - /// the relevant content to troubleshoot an Azure issue into a unified experience. Solutions include the following components - /// : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities - /// to support new solutions types in the future. Each solution type may require one or more ‘requiredParameters’ that are - /// required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some - /// of the solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ - /// from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ - /// from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ - /// from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters - ///
+ /// Solution discovery using natural language processing. /// - /// The required request body for this solution resource creation. + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1039,29 +1033,24 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource 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) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/discoverSolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/discoverSolutions'"); } // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var solutionResourceName = _match.Groups["solutionResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.Help/solutions/" - + solutionResourceName + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1070,7 +1059,7 @@ public partial class SelfHelp // generate request 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); + 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; } @@ -1079,11 +1068,11 @@ public partial class SelfHelp 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.SolutionCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpTenantScopePost_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -1093,7 +1082,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionCreate_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) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_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 ) { @@ -1104,102 +1093,6 @@ public partial class SelfHelp 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 ) @@ -1207,7 +1100,7 @@ public partial class SelfHelp 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.Api20230901Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1229,35 +1122,24 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// 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. - /// Solution resource Name. - /// The required request body for this solution resource creation. + /// Request body for discovering solutions using NLP. /// 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 SolutionCreate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(scope),scope); - await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); - await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); - await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Get the solution using the applicable solutionResourceName while creating the solution. - /// - /// This is an extension resource provider and only resource level extension is supported at the moment. - /// Solution resource Name. + /// 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). @@ -1266,18 +1148,15 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionGet(string scope, string solutionResourceName, 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) + 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/solutions/" - + global::System.Uri.EscapeDataString(solutionResourceName) + "/providers/Microsoft.Help/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1291,13 +1170,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Get the solution using the applicable solutionResourceName while creating the solution. - /// + /// 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 @@ -1307,29 +1184,24 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionGetViaIdentity(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) + 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + 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 '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'"); } // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var solutionResourceName = _match.Groups["solutionResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.Help/solutions/" - + solutionResourceName + "/providers/Microsoft.Help/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1343,11 +1215,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -1357,7 +1229,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionGet_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) + 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 ) { @@ -1375,7 +1247,7 @@ public partial class SelfHelp 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.Api20230901Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1397,33 +1269,31 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. + /// 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. - /// Solution resource Name. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionGet_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(scope),scope); - await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); - await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); - await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + } } /// - /// Update the requiredInputs or additional information needed to execute the solution + /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
///
- /// This is an extension resource provider and only resource level extension is supported at the moment. - /// Solution resource Name. - /// The required request body for updating a solution resource. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// The required request body for simplified Solutions resource creation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1432,9 +1302,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionUpdate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody 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) + public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1442,8 +1312,8 @@ public partial class SelfHelp var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/" + (scope) - + "/providers/Microsoft.Help/solutions/" - + global::System.Uri.EscapeDataString(solutionResourceName) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1452,7 +1322,7 @@ public partial class SelfHelp // generate request 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.Patch, _url); + 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; } @@ -1461,15 +1331,18 @@ public partial class SelfHelp 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.SolutionUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.SimplifiedSolutionsCreate_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Update the requiredInputs or additional information needed to execute the solution + /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
///
/// - /// The required request body for updating a solution resource. + /// The required request body for simplified Solutions resource creation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1478,29 +1351,29 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody 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) + public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); } // replace URI parameters with values from identity var scope = _match.Groups["scope"].Value; - var solutionResourceName = _match.Groups["solutionResourceName"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/" + scope - + "/providers/Microsoft.Help/solutions/" - + solutionResourceName + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1509,7 +1382,7 @@ public partial class SelfHelp // generate request 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.Patch, _url); + 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; } @@ -1518,11 +1391,11 @@ public partial class SelfHelp 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.SolutionUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.SimplifiedSolutionsCreate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -1532,7 +1405,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionUpdate_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) + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate_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 ) { @@ -1646,7 +1519,7 @@ public partial class SelfHelp 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.Api20230901Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1668,17 +1541,1268 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// 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. - /// Solution resource Name. - /// The required request body for updating a solution resource. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// The required request body for simplified Solutions resource creation. + /// 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 SimplifiedSolutionsCreate_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); + await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); + await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); + await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.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 SimplifiedSolutionsGet(string scope, string simplifiedSolutionsResourceName, 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "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.SimplifiedSolutionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SimplifiedSolutionsGetViaIdentity(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 = @"2024-03-01-preview"; + // 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/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + + "?" + + "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.SimplifiedSolutionsGet_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 SimplifiedSolutionsGet_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.Api20240301Preview.SimplifiedSolutionsResource.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.Api40.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. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGet_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); + await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); + await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); + await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,@"^[A-Za-z0-9-+@()_]+$"); + } + } + + /// + /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for this solution resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionCreate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "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.SolutionCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// + /// The required request body for this solution resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource 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 = @"2024-03-01-preview"; + // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "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.SolutionCreate_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 SolutionCreate_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.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + 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.Api40.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. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for this solution resource creation. + /// 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 SolutionCreate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); + await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); + await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); + await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.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 SolutionGet(string scope, string solutionResourceName, 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "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.SolutionGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionGetViaIdentity(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 = @"2024-03-01-preview"; + // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "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.SolutionGet_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 SolutionGet_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.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + 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.Api40.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. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionGet_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); + await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); + await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); + await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + } + } + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionSelfHelpGet(string solutionId, 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/selfHelp/" + + global::System.Uri.EscapeDataString(solutionId) + + "?" + + "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.SolutionSelfHelpGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionSelfHelpGetViaIdentity(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 = @"2024-03-01-preview"; + // 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/selfHelp/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/selfHelp/{solutionId}'"); + } + + // replace URI parameters with values from identity + var solutionId = _match.Groups["solutionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/selfHelp/" + + solutionId + + "?" + + "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.SolutionSelfHelpGet_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 SolutionSelfHelpGet_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.Api20240301Preview.SolutionResourceSelfHelp.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.Api40.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. + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// 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 SolutionSelfHelpGet_Validate(string solutionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(solutionId),solutionId); + await eventListener.AssertMinimumLength(nameof(solutionId),solutionId,1); + await eventListener.AssertMaximumLength(nameof(solutionId),solutionId,100); + } + } + + /// + /// Update the requiredInputs or additional information needed to execute the solution + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for updating a solution resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionUpdate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "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.Patch, _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.SolutionUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update the requiredInputs or additional information needed to execute the solution + /// + /// + /// The required request body for updating a solution resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the 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 SolutionUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody 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 = @"2024-03-01-preview"; + // 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/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "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.Patch, _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.SolutionUpdate_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 SolutionUpdate_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.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + 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.Api40.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. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for updating a solution resource. + /// 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 SolutionUpdate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); + await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); + await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); + await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for warming up a solution resource. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.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 SolutionWarmUp(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, 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 = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "/warmup" + + "?" + + "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.SolutionWarmUp_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// The required request body for warming up a solution resource. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.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 SolutionWarmUpViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, 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 = @"2024-03-01-preview"; + // 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/solutions/(?[^/]+)/warmup$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "/warmup" + + "?" + + "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.SolutionWarmUp_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 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 SolutionWarmUp_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, 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.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + 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.Api40.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. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for warming up a solution resource. /// 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 SolutionUpdate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionWarmUp_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1697,7 +2821,8 @@ public partial class SelfHelp /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// The required request body for going to next step in Troubleshooter resource. /// a delegate that is called when the remote service returns 204 (NoContent). @@ -1708,9 +2833,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersContinue(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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) + public async global::System.Threading.Tasks.Task TroubleshootersContinue(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1757,9 +2882,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersContinueViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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) + public async global::System.Threading.Tasks.Task TroubleshootersContinueViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1830,7 +2955,7 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.512\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.518\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -1855,14 +2980,15 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// The required request body for going to next step in Troubleshooter resource. /// 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 TroubleshootersContinue_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TroubleshootersContinue_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1878,15 +3004,15 @@ public partial class SelfHelp /// /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ - /// as the trigger.
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional - /// inputs from you in each stage while troubleshooting an Azure issue. You will be guided down decision tree style workflow - /// and the best possible solution will be presented at the end of the workflow.
Create API creates the Troubleshooter - /// API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
- /// CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE - /// API.

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ - /// in the request body of Troubleshooters API. + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. ///
- /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// The required request body for this Troubleshooter resource creation. /// a delegate that is called when the remote service returns 200 (OK). @@ -1898,9 +3024,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersCreate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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) + public async global::System.Threading.Tasks.Task TroubleshootersCreate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1933,13 +3059,12 @@ public partial class SelfHelp /// /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ - /// as the trigger.
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional - /// inputs from you in each stage while troubleshooting an Azure issue. You will be guided down decision tree style workflow - /// and the best possible solution will be presented at the end of the workflow.
Create API creates the Troubleshooter - /// API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
- /// CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE - /// API.

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ - /// in the request body of Troubleshooters API. + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. ///
/// /// The required request body for this Troubleshooter resource creation. @@ -1952,9 +3077,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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) + public async global::System.Threading.Tasks.Task TroubleshootersCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2007,7 +3132,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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) + internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, 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 ) { @@ -2025,13 +3150,13 @@ public partial class SelfHelp 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.Api20230901Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2056,14 +3181,15 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// The required request body for this Troubleshooter resource creation. /// 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 TroubleshootersCreate_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2078,7 +3204,8 @@ public partial class SelfHelp } /// Ends the troubleshooter action - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2090,7 +3217,7 @@ public partial class SelfHelp ///
public async global::System.Threading.Tasks.Task TroubleshootersEnd(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2130,7 +3257,7 @@ public partial class SelfHelp ///
public async global::System.Threading.Tasks.Task TroubleshootersEndViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2197,7 +3324,7 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.512\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.518\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -2222,7 +3349,8 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// an instance that will receive events. /// @@ -2246,7 +3374,8 @@ public partial class SelfHelp /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created /// using the Create API. /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2256,9 +3385,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersGet(string scope, string troubleshooterName, 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) + public async global::System.Threading.Tasks.Task TroubleshootersGet(string scope, string troubleshooterName, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2300,9 +3429,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersGetViaIdentity(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) + public async global::System.Threading.Tasks.Task TroubleshootersGetViaIdentity(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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2350,7 +3479,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersGet_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) + internal async global::System.Threading.Tasks.Task TroubleshootersGet_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 ) { @@ -2368,7 +3497,7 @@ public partial class SelfHelp 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.Api20230901Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2393,7 +3522,8 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// an instance that will receive events. /// @@ -2415,7 +3545,8 @@ public partial class SelfHelp /// Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource /// name which should be used in subsequent request. The old resource name is obsolete after this API is invoked. /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2425,9 +3556,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersRestart(string scope, string troubleshooterName, 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) + public async global::System.Threading.Tasks.Task TroubleshootersRestart(string scope, string troubleshooterName, 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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2468,9 +3599,9 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersRestartViaIdentity(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) + public async global::System.Threading.Tasks.Task TroubleshootersRestartViaIdentity(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-09-01-preview"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2519,7 +3650,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersRestart_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) + internal async global::System.Threading.Tasks.Task TroubleshootersRestart_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 ) { @@ -2537,7 +3668,7 @@ public partial class SelfHelp 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.Api20230901Preview.RestartTroubleshooterResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -2562,7 +3693,8 @@ public partial class SelfHelp /// 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. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// /// Troubleshooter resource Name. /// an instance that will receive events. /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs index 0ddd3abe4f4c..8a10bad997a6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs @@ -38,6 +38,10 @@ public partial struct DiagnosticProvisioningState : { yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs index 841134276016..81d12809133c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs @@ -19,6 +19,9 @@ public partial struct DiagnosticProvisioningState : /// Some Diagnostics are still running or failed. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState PartialComplete = @"PartialComplete"; + /// All Diagnostics are still running. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Running = @"Running"; + /// All Diagnostics in the Batch succeeded. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Succeeded = @"Succeeded"; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs index 8775ac9f48ae..9fb0324f03f6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs @@ -10,12 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support public partial struct ExecutionStatus : System.IEquatable { + /// Step execution failed public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Failed = @"Failed"; + /// Step execution running public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Running = @"Running"; + /// Step execution succeeded. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Success = @"Success"; + /// Step execution warning public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Warning = @"Warning"; /// the value for an instance of the Enum. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs index 7cdd17d3203c..f3e97bc0b170 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support { - /// Text Input. Will be a single line input. + /// Type of Question [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionTypeTypeConverter))] public partial struct QuestionType : System.Management.Automation.IArgumentCompleter @@ -42,6 +42,14 @@ public partial struct QuestionType : { yield return new global::System.Management.Automation.CompletionResult("'MultiLineInfoBox'", "MultiLineInfoBox", global::System.Management.Automation.CompletionResultType.ParameterValue, "MultiLineInfoBox"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DateTimePicker".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DateTimePicker'", "DateTimePicker", global::System.Management.Automation.CompletionResultType.ParameterValue, "DateTimePicker"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MultiSelect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MultiSelect'", "MultiSelect", global::System.Management.Automation.CompletionResultType.ParameterValue, "MultiSelect"); + } } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs index 3c696f8e7800..2d5d6b4edb0d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support { - /// Text Input. Will be a single line input. + /// Type of Question public partial class QuestionTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs index 0aceecce54f9..584b94b26749 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs @@ -6,16 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support { - /// Text Input. Will be a single line input. + /// Type of Question public partial struct QuestionType : System.IEquatable { + /// DateTime Picker + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType DateTimePicker = @"DateTimePicker"; + /// SingleChoice dropdown. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType Dropdown = @"Dropdown"; /// MultiLineInfoBox public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType MultiLineInfoBox = @"MultiLineInfoBox"; + /// Multi Select + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType MultiSelect = @"MultiSelect"; + /// SingleChoice radio button public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType RadioButton = @"RadioButton"; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs index eeaa99089d84..dd03ffdce267 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs @@ -30,10 +30,18 @@ public partial struct SolutionProvisioningState : { yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PartialComplete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PartialComplete'", "PartialComplete", global::System.Management.Automation.CompletionResultType.ParameterValue, "PartialComplete"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs index 2df13bc8a76d..371fd1c1278b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs @@ -10,10 +10,19 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support public partial struct SolutionProvisioningState : System.IEquatable { + /// When Solutions request gets canceled. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Canceled = @"Canceled"; + /// All Solutions failed to run. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Failed = @"Failed"; + /// Some Solutions are still running or failed. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState PartialComplete = @"PartialComplete"; + + /// All Solutions are still running. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Running = @"Running"; + + /// All Solutions in the Batch succeeded. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Succeeded = @"Succeeded"; /// the value for an instance of the Enum. diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs index 465ab047a2da..d4ba6a8357e6 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs @@ -34,6 +34,14 @@ public partial struct SolutionType : { yield return new global::System.Management.Automation.CompletionResult("'Solutions'", "Solutions", global::System.Management.Automation.CompletionResultType.ParameterValue, "Solutions"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Troubleshooters".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Troubleshooters'", "Troubleshooters", global::System.Management.Automation.CompletionResultType.ParameterValue, "Troubleshooters"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SelfHelp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SelfHelp'", "SelfHelp", global::System.Management.Automation.CompletionResultType.ParameterValue, "SelfHelp"); + } } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs index 727a41a24169..b6b1948a9288 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs @@ -13,9 +13,15 @@ public partial struct SolutionType : /// Diagnostics resource type. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Diagnostics = @"Diagnostics"; + /// SelfHelp resource type. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType SelfHelp = @"SelfHelp"; + /// Solutions resource type. public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Solutions = @"Solutions"; + /// Troubleshooters resource type. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Troubleshooters = @"Troubleshooters"; + /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs index 9ea3108ed145..46526170135d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs @@ -42,6 +42,10 @@ public partial struct Type : { yield return new global::System.Management.Automation.CompletionResult("'AutomatedCheck'", "AutomatedCheck", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutomatedCheck"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Input".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Input'", "Input", global::System.Management.Automation.CompletionResultType.ParameterValue, "Input"); + } } } } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs index 19ee62ae9826..ce441900df21 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs @@ -14,6 +14,8 @@ public partial struct Type : public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Decision = @"Decision"; + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Input = @"Input"; + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Insight = @"Insight"; public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Solution = @"Solution"; diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs new file mode 100644 index 000000000000..7f4a46d9ff11 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support +{ + + /// Validation scope + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScopeTypeConverter))] + public partial struct ValidationScope : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "URLFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'URLFormat'", "URLFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "URLFormat"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GuidFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GuidFormat'", "GuidFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "GuidFormat"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IpAddressFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IpAddressFormat'", "IpAddressFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "IpAddressFormat"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NumberOnlyFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NumberOnlyFormat'", "NumberOnlyFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "NumberOnlyFormat"); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.TypeConverter.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.TypeConverter.cs new file mode 100644 index 000000000000..f7ce35f009f8 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support +{ + + /// Validation scope + public partial class ValidationScopeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ValidationScope.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.cs b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.cs new file mode 100644 index 000000000000..e7d7652069b9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.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.Support +{ + + /// Validation scope + public partial struct ValidationScope : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope GuidFormat = @"GuidFormat"; + + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope IPAddressFormat = @"IpAddressFormat"; + + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope None = @"None"; + + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope NumberOnlyFormat = @"NumberOnlyFormat"; + + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope UrlFormat = @"URLFormat"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ValidationScope + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ValidationScope(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ValidationScope + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ValidationScope (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ValidationScope && Equals((ValidationScope)obj); + } + + /// Returns hashCode for enum ValidationScope + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ValidationScope + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ValidationScope(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to ValidationScope + /// the value to convert to an instance of . + + public static implicit operator ValidationScope(string value) + { + return new ValidationScope(value); + } + + /// Implicit operator to convert ValidationScope to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e) + { + return e._value; + } + + /// Overriding != operator for enum ValidationScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ValidationScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs index 79db1f570f8b..da4dd2e36fd8 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiagnostic_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -117,13 +117,13 @@ public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Aut private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -146,12 +146,12 @@ public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Aut /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -174,7 +174,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -320,6 +337,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -364,12 +396,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +413,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs index 13608b99f734..cb4208bfad7e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiagnostic_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -123,12 +123,12 @@ public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Man /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,7 +151,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -313,6 +330,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -357,12 +389,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +406,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs index c6527e5ea02c..ca5228f3ab7e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs @@ -11,19 +11,19 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// /// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) /// AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies - /// relevant Azure diagnostics and solutions. We will do our best to return the most effective solutions based on the type - /// of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) - ///
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + /// relevant Azure diagnostics and solutions.

Required Input : problemClassificationId (Use the [problemClassification + /// API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri + /// OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ + /// as an input to Diagnostics and Solutions API. ///
/// - /// [OpenAPI] List=>GET:"/{scope}/providers/Microsoft.Help/discoverySolutions" + /// [OpenAPI] List=>GET:"/providers/Microsoft.Help/discoverySolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiscoverySolution_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. We will do our best to return the most effective solutions based on the type of inputs, in the request URL

Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions.

Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP))
Optional input: resourceUri OR resource Type

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/discoverySolutions", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverySolutions", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -69,15 +69,15 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage private string _filter; /// - /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' - /// and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId - /// eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' + /// filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' + /// and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'", + Description = @"'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'", SerializedName = @"$filter", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Query)] @@ -127,22 +127,6 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Backing field for property. - private string _scope; - - /// - /// This is an extension resource provider and only resource level extension is supported at the moment. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = true, - 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) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] - public string Scope { get => this._scope; set => this._scope = value; } - /// Backing field for property. private string _skiptoken; @@ -174,12 +158,12 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -202,7 +186,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -324,12 +325,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DiscoverySolutionList(Scope, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null, onOk, onDefault, this, Pipeline); + await this.Client.DiscoverySolutionList(this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -348,6 +349,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -375,14 +391,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -392,12 +408,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiscoveryResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs index fc6a91a10c02..6edfd2a3fc47 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Returns list of operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/operations", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/operations", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -148,7 +148,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -294,6 +311,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs new file mode 100644 index 000000000000..8ad891ecce73 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// + /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSimplifiedSolution_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Simplified Solutions Resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Simplified Solutions Resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Simplified Solutions Resource Name.", + SerializedName = @"simplifiedSolutionsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SimplifiedSolutionsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzSelfHelpSimplifiedSolution_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SimplifiedSolutionsGet(Scope, SResourceName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs new file mode 100644 index 000000000000..eeca26eeda8a --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// + /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSimplifiedSolution_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzSelfHelpSimplifiedSolution_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SimplifiedSolutionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SimplifiedSolutionsResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SimplifiedSolutionsResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SimplifiedSolutionsGet(InputObject.Scope ?? null, InputObject.SimplifiedSolutionsResourceName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs new file mode 100644 index 000000000000..c7f3931a11ef --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// + /// [OpenAPI] Get=>GET:"/providers/Microsoft.Help/selfHelp/{solutionId}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolutionSelfHelp_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot their issues.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/selfHelp/{solutionId}", ApiVersion = "2024-03-01-preview")] + public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _solutionId; + + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SolutionId { get => this._solutionId; set => this._solutionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzSelfHelpSolutionSelfHelp_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionSelfHelpGet(SolutionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs new file mode 100644 index 000000000000..30685e4e15e3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// + /// [OpenAPI] Get=>GET:"/providers/Microsoft.Help/selfHelp/{solutionId}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolutionSelfHelp_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot their issues.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/selfHelp/{solutionId}", ApiVersion = "2024-03-01-preview")] + public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzSelfHelpSolutionSelfHelp_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SolutionSelfHelpGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SolutionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SolutionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SolutionSelfHelpGet(InputObject.SolutionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs index 3e9e5bb79cf7..d84c36ab0eb5 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolution_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the solution using the applicable solutionResourceName while creating the solution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolution_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -117,13 +117,13 @@ public partial class GetAzSelfHelpSolution_Get : global::System.Management.Autom private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -146,12 +146,12 @@ public partial class GetAzSelfHelpSolution_Get : global::System.Management.Autom /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -174,7 +174,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -320,6 +337,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -364,12 +396,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +413,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs index ffe844f837a8..d3d9b33e415c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolution_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the solution using the applicable solutionResourceName while creating the solution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolution_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -123,12 +123,12 @@ public partial class GetAzSelfHelpSolution_GetViaIdentity : global::System.Manag /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,7 +151,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -313,6 +330,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -357,12 +389,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +406,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs index 1a005e692ddc..44cfae54a2ab 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs @@ -18,10 +18,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpTroubleshooter_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -120,13 +120,13 @@ public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -149,12 +149,12 @@ public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -177,7 +177,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -367,12 +399,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +416,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs index 27c6510fcc32..4f9276a91f7f 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs @@ -18,10 +18,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpTroubleshooter_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -126,12 +126,12 @@ public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -154,7 +154,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -316,6 +333,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -360,12 +392,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +409,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs index 990fe5b0d6df..edbabc87ca1f 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_Post", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -115,13 +115,13 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -144,12 +144,12 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -172,7 +172,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -321,6 +338,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -365,12 +397,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +414,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs index b96c8d3785b0..abb3cff60f30 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -116,13 +116,13 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -156,12 +156,12 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -184,7 +184,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -333,6 +350,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -377,12 +409,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,7 +426,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs index 3d7eaa004673..e0d79cc09e72 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -136,12 +136,12 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -164,7 +164,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -325,6 +342,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -369,12 +401,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +418,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs index 0d243747c27e..1380ae700965 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -148,12 +148,12 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -176,7 +176,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -337,6 +354,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -381,12 +413,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,7 +430,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs index 1a17156633c6..f0402c7310c3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -47,7 +47,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody _continueRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody; /// Troubleshooter ContinueRequest body. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter ContinueRequest body.", ValueFromPipeline = true)] @@ -56,8 +56,8 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S ReadOnly = false, Description = @"Troubleshooter ContinueRequest body.", SerializedName = @"continueRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -124,13 +124,13 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs index a268b46bb68a..00f8532de263 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -39,7 +39,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter ContinueRequest body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ContinueRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -119,20 +119,20 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g ReadOnly = false, Description = @".", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } /// Backing field for property. private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -208,7 +208,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -357,6 +374,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs index ed54d968b607..67b35c61c3a0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -47,7 +47,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody _continueRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody; /// Troubleshooter ContinueRequest body. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter ContinueRequest body.", ValueFromPipeline = true)] @@ -56,8 +56,8 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity ReadOnly = false, Description = @"Troubleshooter ContinueRequest body.", SerializedName = @"continueRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -173,7 +173,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -338,6 +355,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs index d09793f73e8b..e9d087b51ef0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -39,7 +39,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter ContinueRequest body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ContinueRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -127,8 +127,8 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE ReadOnly = false, Description = @".", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } /// Unique id of the result. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Unique id of the result.")] @@ -186,7 +186,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -352,6 +369,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs new file mode 100644 index 000000000000..377d309952bb --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; + + /// Discover NLP request. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Discover NLP request.", + SerializedName = @"discoverSolutionRequest", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpSubscriptionScopePost(SubscriptionId, DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=DiscoverSolutionRequest}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs new file mode 100644 index 000000000000..73eed045717e --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Discover NLP request. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + + /// Additional information in the form of a string. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information in the form of a string.", + SerializedName = @"additionalContext", + PossibleTypes = new [] { typeof(string) })] + public string AdditionalContext { get => _discoverSolutionRequestBody.AdditionalContext ?? null; set => _discoverSolutionRequestBody.AdditionalContext = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Describe the issue with the affected resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describe the issue with the affected resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describe the issue with the affected resource.", + SerializedName = @"issueSummary", + PossibleTypes = new [] { typeof(string) })] + public string IssueSummary { get => _discoverSolutionRequestBody.IssueSummary ?? null; set => _discoverSolutionRequestBody.IssueSummary = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Provide resourceId of affected resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provide resourceId of affected resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provide resourceId of affected resource", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } + + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpSubscriptionScopePost(SubscriptionId, _discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_discoverSolutionRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs new file mode 100644 index 000000000000..38e2964d51a4 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; + + /// Discover NLP request. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Discover NLP request.", + SerializedName = @"discoverSolutionRequest", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaIdentity(InputObject.Id, DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DiscoverySolutionNlpSubscriptionScopePost(InputObject.SubscriptionId ?? null, DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs new file mode 100644 index 000000000000..0da39ce9a0c4 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs @@ -0,0 +1,463 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Discover NLP request. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + + /// Additional information in the form of a string. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information in the form of a string.", + SerializedName = @"additionalContext", + PossibleTypes = new [] { typeof(string) })] + public string AdditionalContext { get => _discoverSolutionRequestBody.AdditionalContext ?? null; set => _discoverSolutionRequestBody.AdditionalContext = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Describe the issue with the affected resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describe the issue with the affected resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describe the issue with the affected resource.", + SerializedName = @"issueSummary", + PossibleTypes = new [] { typeof(string) })] + public string IssueSummary { get => _discoverSolutionRequestBody.IssueSummary ?? null; set => _discoverSolutionRequestBody.IssueSummary = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Provide resourceId of affected resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provide resourceId of affected resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provide resourceId of affected resource", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } + + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaIdentity(InputObject.Id, _discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DiscoverySolutionNlpSubscriptionScopePost(InputObject.SubscriptionId ?? null, _discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs new file mode 100644 index 000000000000..a5b6a52e0ae7 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_Post", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; + + /// Discover NLP request. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Discover NLP request.", + SerializedName = @"discoverSolutionRequest", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpTenantScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpTenantScopePost(DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs new file mode 100644 index 000000000000..d4b29e179cda --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Discover NLP request. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + + /// Additional information in the form of a string. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information in the form of a string.", + SerializedName = @"additionalContext", + PossibleTypes = new [] { typeof(string) })] + public string AdditionalContext { get => _discoverSolutionRequestBody.AdditionalContext ?? null; set => _discoverSolutionRequestBody.AdditionalContext = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Describe the issue with the affected resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describe the issue with the affected resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describe the issue with the affected resource.", + SerializedName = @"issueSummary", + PossibleTypes = new [] { typeof(string) })] + public string IssueSummary { get => _discoverSolutionRequestBody.IssueSummary ?? null; set => _discoverSolutionRequestBody.IssueSummary = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Provide resourceId of affected resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provide resourceId of affected resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provide resourceId of affected resource", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } + + /// + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP + /// Service Id is the GUID which can be found under name field in Services List response + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + SerializedName = @"serviceId", + PossibleTypes = new [] { typeof(string) })] + public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpTenantScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpTenantScopePost(_discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / value / + WriteObject((await response).Value, true); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs new file mode 100644 index 000000000000..73a641d4016b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_Warm", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _solutionResourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; + + /// Solution WarmUpRequest body + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution WarmUpRequest body", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution WarmUpRequest body", + SerializedName = @"solutionWarmUpRequestBody", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_Warm() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionWarmUp(Scope, SolutionResourceName, SolutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName,body=SolutionWarmUpRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=SolutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=SolutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs new file mode 100644 index 000000000000..dbbe05e644b9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_WarmExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Solution WarmUpRequest body + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBody(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Dictionary of + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Dictionary of ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Dictionary of ", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _solutionResourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_WarmExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionWarmUp(Scope, SolutionResourceName, _solutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName,body=_solutionWarmUpRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=_solutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=_solutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs new file mode 100644 index 000000000000..be887a1bdf43 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_WarmViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; + + /// Solution WarmUpRequest body + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution WarmUpRequest body", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution WarmUpRequest body", + SerializedName = @"solutionWarmUpRequestBody", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SolutionWarmUpViaIdentity(InputObject.Id, SolutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SolutionResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SolutionResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SolutionWarmUp(InputObject.Scope ?? null, InputObject.SolutionResourceName ?? null, SolutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs new file mode 100644 index 000000000000..c5333f8b925b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Solution WarmUpRequest body + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBody(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Dictionary of + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Dictionary of ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Dictionary of ", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SolutionWarmUpViaIdentity(InputObject.Id, _solutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SolutionResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SolutionResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SolutionWarmUp(InputObject.Scope ?? null, InputObject.SolutionResourceName ?? null, _solutionWarmUpRequestBody, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs index 4d975bcfe116..9a98acd71feb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs @@ -10,18 +10,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics - /// tells you precisely the root cause of the issue and the steps to address it. You can get diagnostics once you discover - /// the relevant solution for your Azure issue.

Note: requiredInputs’ from Discovery solutions response - /// must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. ///
/// /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpDiagnostic_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics tells you precisely the root cause of the issue and the steps to address it. You can get diagnostics once you discover the relevant solution for your Azure issue.

Note: requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -40,7 +40,7 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Diagnostic resource - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource _diagnosticResourceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.DiagnosticResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource _diagnosticResourceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -65,17 +65,20 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Global parameters that can be passed to all solutionIds. + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Global parameters that can be passed to all solutionIds.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Global parameters that can be passed to all solutionIds.", + Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => _diagnosticResourceRequestBody.GlobalParameter ?? null /* object */; set => _diagnosticResourceRequestBody.GlobalParameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => _diagnosticResourceRequestBody.GlobalParameter ?? null /* object */; set => _diagnosticResourceRequestBody.GlobalParameter = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -98,8 +101,8 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man ReadOnly = false, Description = @"SolutionIds that are needed to be invoked.", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] Insight { get => _diagnosticResourceRequestBody.Insight ?? null /* arrayOf */; set => _diagnosticResourceRequestBody.Insight = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => _diagnosticResourceRequestBody.Insight ?? null /* arrayOf */; set => _diagnosticResourceRequestBody.Insight = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -160,13 +163,13 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -189,12 +192,12 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -240,7 +243,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpDiagnost /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -419,6 +439,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -463,12 +498,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,7 +515,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs new file mode 100644 index 000000000000..7f5219add7b5 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by 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.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using System; + + /// + /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpSimplifiedSolution_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Simplified Solutions response. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource _simplifiedSolutionsRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Client input parameters to run Simplified Solutions + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client input parameters to run Simplified Solutions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Simplified Solutions", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => _simplifiedSolutionsRequestBody.Parameter ?? null /* object */; set => _simplifiedSolutionsRequestBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Simplified Solutions Resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Simplified Solutions Resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Simplified Solutions Resource Name.", + SerializedName = @"simplifiedSolutionsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SimplifiedSolutionsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Solution Id to identify single Simplified Solution. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single Simplified Solution.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution Id to identify single Simplified Solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + public string SolutionId { get => _simplifiedSolutionsRequestBody.SolutionId ?? null; set => _simplifiedSolutionsRequestBody.SolutionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSimplifiedSolution_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSimplifiedSolution_CreateExpanded Clone() + { + var clone = new NewAzSelfHelpSimplifiedSolution_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._simplifiedSolutionsRequestBody = this._simplifiedSolutionsRequestBody; + clone.Scope = this.Scope; + clone.SResourceName = this.SResourceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSimplifiedSolution_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SimplifiedSolutionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SimplifiedSolutionsCreate(Scope, SResourceName, _simplifiedSolutionsRequestBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName,body=_simplifiedSolutionsRequestBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_simplifiedSolutionsRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_simplifiedSolutionsRequestBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs index 62207bd6c4d0..17351a561664 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs @@ -9,25 +9,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets using System; /// - /// Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ - /// from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all - /// the relevant content to troubleshoot an Azure issue into a unified experience. Solutions include the following components - /// : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities - /// to support new solutions types in the future. Each solution type may require one or more ‘requiredParameters’ that are - /// required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some - /// of the solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ - /// from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ - /// from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ - /// from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters + /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters ///
/// /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpSolution_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -46,7 +48,7 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Solution response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource _solutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource _solutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -61,17 +63,6 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; - /// The HTML content that needs to be rendered and shown to customer. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The HTML content that needs to be rendered and shown to customer.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - public string Content { get => _solutionRequestBody.Content ?? null; set => _solutionRequestBody.Content = value; } - /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -122,26 +113,14 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionRequestBody.Parameter ?? null /* object */; set => _solutionRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionRequestBody.Parameter ?? null /* object */; set => _solutionRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } - /// Status of solution provisioning. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of solution provisioning.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState ProvisioningState { get => _solutionRequestBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState)""); set => _solutionRequestBody.ProvisioningState = value; } - /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] @@ -158,80 +137,6 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Solution diagnostics results. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution diagnostics results.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => _solutionRequestBody.ReplacementMapDiagnostic ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapDiagnostic = value; } - - /// Solution metrics based charts - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution metrics based charts")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => _solutionRequestBody.ReplacementMapMetricsBasedChart ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapMetricsBasedChart = value; } - - /// Solutions Troubleshooters - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solutions Troubleshooters")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => _solutionRequestBody.ReplacementMapTroubleshooter ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapTroubleshooter = value; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Video solutions, which have the power to engage the customer by stimulating their senses")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => _solutionRequestBody.ReplacementMapVideo ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapVideo = value; } - - /// Group of Videos - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Group of Videos")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => _solutionRequestBody.ReplacementMapVideoGroup ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapVideoGroup = value; } - - /// Solution AzureKB results - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution AzureKB results")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => _solutionRequestBody.ReplacementMapWebResult ?? null /* arrayOf */; set => _solutionRequestBody.ReplacementMapWebResult = value; } - /// Backing field for property. private string _resourceName; @@ -251,52 +156,18 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] public string Scope { get => this._scope; set => this._scope = value; } - /// List of section object. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of section object.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => _solutionRequestBody.Section ?? null /* arrayOf */; set => _solutionRequestBody.Section = value; } - - /// Solution Id to identify single solution. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single solution.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - public string SolutionId { get => _solutionRequestBody.SolutionId ?? null; set => _solutionRequestBody.SolutionId = value; } - - /// The title. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The title.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - public string Title { get => _solutionRequestBody.Title ?? null; set => _solutionRequestBody.Title = value; } - /// Solution request trigger criteria [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution request trigger criteria")] @@ -306,8 +177,8 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionRequestBody.TriggerCriterion = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -326,12 +197,12 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -377,7 +248,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSolution /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -556,6 +444,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -600,12 +503,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -617,7 +520,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs index ba1181d33cd2..b697f37ce05c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs @@ -10,22 +10,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ - /// as the trigger.
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional - /// inputs from you in each stage while troubleshooting an Azure issue. You will be guided down decision tree style workflow - /// and the best possible solution will be presented at the end of the workflow.
Create API creates the Troubleshooter - /// API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
- /// CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE - /// API.

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ - /// in the request body of Troubleshooters API. + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. ///
/// /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpTroubleshooter_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow.
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’
After creating the Troubleshooter instance, the following APIs can be used:
CONTINUE API: to move to the next step in the flow
GET API: to identify the next step after executing the CONTINUE API.

Note: ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ in the request body of Troubleshooters API.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -44,7 +43,7 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource _createTroubleshooterRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.TroubleshooterResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource _createTroubleshooterRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -111,8 +110,8 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System ReadOnly = false, Description = @"Client input parameters to run Troubleshooter Resource", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => _createTroubleshooterRequestBody.Parameter ?? null /* object */; set => _createTroubleshooterRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => _createTroubleshooterRequestBody.Parameter ?? null /* object */; set => _createTroubleshooterRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -139,13 +138,13 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -167,12 +166,12 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System /// happens on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -191,12 +190,12 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,7 +218,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -368,14 +384,29 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,7 +418,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource WriteObject((await response)); } } @@ -436,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,7 +484,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs index aba50a0e9ff5..8ab99bc92914 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Restart=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzSelfHelpTroubleshooter_Restart", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource name which should be used in subsequent request. The old resource name is obsolete after this API is invoked.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2024-03-01-preview")] public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -118,13 +118,13 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -147,12 +147,12 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -175,7 +175,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -324,6 +341,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -368,12 +400,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -385,7 +417,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs index 0fbba2ea82e8..3ac8b3b97b17 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Restart=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzSelfHelpTroubleshooter_RestartViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource name which should be used in subsequent request. The old resource name is obsolete after this API is invoked.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2024-03-01-preview")] public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -124,12 +124,12 @@ public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global /// on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -152,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -317,6 +334,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -361,12 +393,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +410,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs index 775d56dd1052..c1163a536a20 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Ends the troubleshooter action")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2024-03-01-preview")] public partial class StopAzSelfHelpTroubleshooter_End : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -122,13 +122,13 @@ public partial class StopAzSelfHelpTroubleshooter_End : global::System.Managemen private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] @@ -179,7 +179,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -328,6 +345,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs index 4a2e7ee37e36..de1ac7bc5442 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Ends the troubleshooter action")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2024-03-01-preview")] public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -156,7 +156,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -321,6 +338,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs index 8107b51fea77..037c71e91457 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Update the requiredInputs or additional information needed to execute the solution ")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -36,8 +36,8 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma ///
private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// Solution response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionPatchRequestBody(); + /// Solution PatchRequest body + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionPatchRequestBody(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -52,17 +52,6 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; - /// The HTML content that needs to be rendered and shown to customer. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The HTML content that needs to be rendered and shown to customer.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - public string Content { get => _solutionPatchRequestBody.Content ?? null; set => _solutionPatchRequestBody.Content = value; } - /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -113,26 +102,14 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } - /// Status of solution provisioning. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of solution provisioning.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState ProvisioningState { get => _solutionPatchRequestBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState)""); set => _solutionPatchRequestBody.ProvisioningState = value; } - /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] @@ -149,80 +126,6 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Solution diagnostics results. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution diagnostics results.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => _solutionPatchRequestBody.ReplacementMapDiagnostic ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapDiagnostic = value; } - - /// Solution metrics based charts - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution metrics based charts")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => _solutionPatchRequestBody.ReplacementMapMetricsBasedChart ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapMetricsBasedChart = value; } - - /// Solutions Troubleshooters - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solutions Troubleshooters")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => _solutionPatchRequestBody.ReplacementMapTroubleshooter ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapTroubleshooter = value; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Video solutions, which have the power to engage the customer by stimulating their senses")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => _solutionPatchRequestBody.ReplacementMapVideo ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapVideo = value; } - - /// Group of Videos - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Group of Videos")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => _solutionPatchRequestBody.ReplacementMapVideoGroup ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapVideoGroup = value; } - - /// Solution AzureKB results - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution AzureKB results")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => _solutionPatchRequestBody.ReplacementMapWebResult ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapWebResult = value; } - /// Backing field for property. private string _resourceName; @@ -242,52 +145,18 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma private string _scope; /// - /// This is an extension resource provider and only resource level extension is supported at the moment. + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ///
- [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "This is an extension resource provider and only resource level extension is supported at the moment.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = true, ReadOnly = false, - Description = @"This is an extension resource provider and only resource level extension is supported at the moment.", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] public string Scope { get => this._scope; set => this._scope = value; } - /// List of section object. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of section object.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => _solutionPatchRequestBody.Section ?? null /* arrayOf */; set => _solutionPatchRequestBody.Section = value; } - - /// Solution Id to identify single solution. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single solution.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - public string SolutionId { get => _solutionPatchRequestBody.SolutionId ?? null; set => _solutionPatchRequestBody.SolutionId = value; } - - /// The title. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The title.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - public string Title { get => _solutionPatchRequestBody.Title ?? null; set => _solutionPatchRequestBody.Title = value; } - /// Solution request trigger criteria [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution request trigger criteria")] @@ -297,8 +166,8 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -317,12 +186,12 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -368,7 +237,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolut /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -547,6 +433,21 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -591,12 +492,12 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -608,7 +509,7 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs index 97407d03d2d4..c8c21b504395 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Update the requiredInputs or additional information needed to execute the solution ")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2023-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener { @@ -36,8 +36,8 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// Solution response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.SolutionPatchRequestBody(); + /// Solution PatchRequest body + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionPatchRequestBody(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -52,17 +52,6 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; - /// The HTML content that needs to be rendered and shown to customer. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The HTML content that needs to be rendered and shown to customer.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - public string Content { get => _solutionPatchRequestBody.Content ?? null; set => _solutionPatchRequestBody.Content = value; } - /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -121,26 +110,14 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } - /// Status of solution provisioning. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of solution provisioning.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState ProvisioningState { get => _solutionPatchRequestBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState)""); set => _solutionPatchRequestBody.ProvisioningState = value; } - /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] @@ -157,114 +134,6 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Solution diagnostics results. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution diagnostics results.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => _solutionPatchRequestBody.ReplacementMapDiagnostic ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapDiagnostic = value; } - - /// Solution metrics based charts - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution metrics based charts")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => _solutionPatchRequestBody.ReplacementMapMetricsBasedChart ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapMetricsBasedChart = value; } - - /// Solutions Troubleshooters - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solutions Troubleshooters")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => _solutionPatchRequestBody.ReplacementMapTroubleshooter ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapTroubleshooter = value; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Video solutions, which have the power to engage the customer by stimulating their senses")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] ReplacementMapVideo { get => _solutionPatchRequestBody.ReplacementMapVideo ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapVideo = value; } - - /// Group of Videos - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Group of Videos")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] ReplacementMapVideoGroup { get => _solutionPatchRequestBody.ReplacementMapVideoGroup ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapVideoGroup = value; } - - /// Solution AzureKB results - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution AzureKB results")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] ReplacementMapWebResult { get => _solutionPatchRequestBody.ReplacementMapWebResult ?? null /* arrayOf */; set => _solutionPatchRequestBody.ReplacementMapWebResult = value; } - - /// List of section object. - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of section object.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] Section { get => _solutionPatchRequestBody.Section ?? null /* arrayOf */; set => _solutionPatchRequestBody.Section = value; } - - /// Solution Id to identify single solution. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single solution.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - public string SolutionId { get => _solutionPatchRequestBody.SolutionId ?? null; set => _solutionPatchRequestBody.SolutionId = value; } - - /// The title. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The title.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - public string Title { get => _solutionPatchRequestBody.Title ?? null; set => _solutionPatchRequestBody.Title = value; } - /// Solution request trigger criteria [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution request trigger criteria")] @@ -274,8 +143,8 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -294,12 +163,12 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -343,7 +212,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolut /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -538,6 +424,21 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// @@ -582,12 +483,12 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -599,7 +500,7 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource WriteObject((await response)); } } diff --git a/src/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 77ff203d6c82..0b674730390c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -269,9 +269,26 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); - sb.Append($"{Indent}{Indent}}}"); + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Az.SelfHelp.md b/src/SelfHelp/SelfHelp.Autorest/help/Az.SelfHelp.md new file mode 100644 index 000000000000..1eb4292cad83 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Az.SelfHelp.md @@ -0,0 +1,92 @@ +--- +Module Name: Az.SelfHelp +Module Guid: 2705ffd2-39d8-491f-b0c6-14fca2dc3727 +Download Help Link: https://learn.microsoft.com/powershell/module/az.selfhelp +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.SelfHelp Module +## Description +Microsoft Azure PowerShell: SelfHelp cmdlets + +## Az.SelfHelp Cmdlets +### [Get-AzSelfHelpDiagnostic](Get-AzSelfHelpDiagnostic.md) +Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. + +### [Get-AzSelfHelpDiscoverySolution](Get-AzSelfHelpDiscoverySolution.md) +Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + +### [Get-AzSelfHelpSimplifiedSolution](Get-AzSelfHelpSimplifiedSolution.md) +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +### [Get-AzSelfHelpSolution](Get-AzSelfHelpSolution.md) +Get the solution using the applicable solutionResourceName while creating the solution. + +### [Get-AzSelfHelpSolutionSelfHelp](Get-AzSelfHelpSolutionSelfHelp.md) +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + +### [Get-AzSelfHelpTroubleshooter](Get-AzSelfHelpTroubleshooter.md) +Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. +This API requires the Troubleshooter resource name that was created using the Create API. + +### [Invoke-AzSelfHelpCheckNameAvailability](Invoke-AzSelfHelpCheckNameAvailability.md) +This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + +### [Invoke-AzSelfHelpContinueTroubleshooter](Invoke-AzSelfHelpContinueTroubleshooter.md) +Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +\
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. +This API is used after the Troubleshooter has been created using the Create API. + +### [Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope](Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md) +Solution discovery using natural language processing. + +### [Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope](Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md) +Solution discovery using natural language processing. + +### [Invoke-AzSelfHelpWarmSolutionUp](Invoke-AzSelfHelpWarmSolutionUp.md) +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +### [New-AzSelfHelpDiagnostic](New-AzSelfHelpDiagnostic.md) +Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + +### [New-AzSelfHelpSimplifiedSolution](New-AzSelfHelpSimplifiedSolution.md) +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +\
+ +### [New-AzSelfHelpSolution](New-AzSelfHelpSolution.md) +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. +In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +\
2. +‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. +‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters + +### [New-AzSelfHelpTroubleshooter](New-AzSelfHelpTroubleshooter.md) +Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. + +### [Restart-AzSelfHelpTroubleshooter](Restart-AzSelfHelpTroubleshooter.md) +Restarts the troubleshooter API using applicable troubleshooter resource name as the input.\
It returns new resource name which should be used in subsequent request. +The old resource name is obsolete after this API is invoked. + +### [Stop-AzSelfHelpTroubleshooter](Stop-AzSelfHelpTroubleshooter.md) +Ends the troubleshooter action + +### [Update-AzSelfHelpSolution](Update-AzSelfHelpSolution.md) +Update the requiredInputs or additional information needed to execute the solution + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiagnostic.md new file mode 100644 index 000000000000..ea3a87a229a0 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiagnostic.md @@ -0,0 +1,122 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic +schema: 2.0.0 +--- + +# Get-AzSelfHelpDiagnostic + +## SYNOPSIS +Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpDiagnostic -Scope -SResourceName [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpDiagnostic -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. + +## EXAMPLES + +### 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 + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Unique resource name for insight resources + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: DiagnosticsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiscoverySolution.md new file mode 100644 index 000000000000..3ae79be9562d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpDiscoverySolution.md @@ -0,0 +1,105 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution +schema: 2.0.0 +--- + +# Get-AzSelfHelpDiscoverySolution + +## SYNOPSIS +Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + +## SYNTAX + +``` +Get-AzSelfHelpDiscoverySolution [-Filter ] [-Skiptoken ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. + +## EXAMPLES + +### Example 1: Get Solution Metadata by resource id +```powershell +Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType + +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- + +a5db90c3-f147-bce6-83b0-ab5e0aeca1f0 +``` + +Get Solution Metadata by resource id + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +'ProblemClassificationId' is a mandatory filter to get solutions ids. +It also supports optional 'ResourceType' and 'SolutionType' filters. +The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. +Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skiptoken +Skiptoken is only used if a previous operation returned a partial result. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..26196808b7e6 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,125 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution +schema: 2.0.0 +--- + +# Get-AzSelfHelpSimplifiedSolution + +## SYNOPSIS +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpSimplifiedSolution -Scope -SResourceName [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpSimplifiedSolution -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## EXAMPLES + +### Example 1: Get Simplified Solutions +```powershell +$resourceName = "sampleRName" + +Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName aits-data-inestion +``` + +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Simplified Solutions Resource Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SimplifiedSolutionsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolution.md new file mode 100644 index 000000000000..63444d9b5f5b --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolution.md @@ -0,0 +1,122 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution +schema: 2.0.0 +--- + +# Get-AzSelfHelpSolution + +## SYNOPSIS +Get the solution using the applicable solutionResourceName while creating the solution. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpSolution -ResourceName -Scope [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpSolution -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the solution using the applicable solutionResourceName while creating the solution. + +## EXAMPLES + +### Example 1: Get-AzSelfHelpSolution by resource id +```powershell +Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev +``` + +Get SelfHelp Solution by resource id + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceName +Solution resource Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SolutionResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolutionSelfHelp.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolutionSelfHelp.md new file mode 100644 index 000000000000..6c735cb6ca4f --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpSolutionSelfHelp.md @@ -0,0 +1,111 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp +schema: 2.0.0 +--- + +# Get-AzSelfHelpSolutionSelfHelp + +## SYNOPSIS +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpSolutionSelfHelp -SolutionId [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpSolutionSelfHelp -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + +## EXAMPLES + +### Example 1: Get Self Help Solutions for a given solutionId +```powershell +Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +apollo-48996ff7-002f-47c1-85b2-df138843d5d5 +``` + +Gets Self Help Solutions for a given solutionId. +Self Help Solutions consist of rich instructional video tutorials, links and guides to public documentation related to a specific problem that enables users to troubleshoot Azure issues. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SolutionId +SolutionId is a unique id to identify a solution. +You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpTroubleshooter.md new file mode 100644 index 000000000000..21abd95a55a0 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Get-AzSelfHelpTroubleshooter.md @@ -0,0 +1,126 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter +schema: 2.0.0 +--- + +# Get-AzSelfHelpTroubleshooter + +## SYNOPSIS +Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. +This API requires the Troubleshooter resource name that was created using the Create API. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. +This API requires the Troubleshooter resource name that was created using the Create API. + +## EXAMPLES + +### Example 1: Get-AzSelfHelpTroubleshooter by troubleshooter name (GUID) +```powershell +Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +02d59989-f8a9-4b69-9919-1ef51df4eff6 + +``` + +Get Azure SelfHelp Troubleshooter by name. +The name is the guid of the troubleshooter. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Troubleshooter resource Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: TroubleshooterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpCheckNameAvailability.md b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpCheckNameAvailability.md new file mode 100644 index 000000000000..d883e02db2dd --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpCheckNameAvailability.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpCheckNameAvailability + +## SYNOPSIS +This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSelfHelpCheckNameAvailability -Scope [-Name ] [-Type ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Post +``` +Invoke-AzSelfHelpCheckNameAvailability -Scope + -CheckNameAvailabilityRequest [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### PostViaIdentity +``` +Invoke-AzSelfHelpCheckNameAvailability -InputObject + -CheckNameAvailabilityRequest [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSelfHelpCheckNameAvailability -InputObject [-Name ] [-Type ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + +## EXAMPLES + +### Example 1: Invoke-AzSelfHelpCheckNameAvailability +```powershell +$CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ + "name" ="helloworld" + “type” = “solutions” + +} + Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST +``` + +```output +Message NameAvailable Reason + +------- ------------- ------ + + True +``` + +Checks if resource name is avilabale/unique for the scope or not + +## PARAMETERS + +### -CheckNameAvailabilityRequest +The check availability request body. +To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest +Parameter Sets: Post, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the resource for which availability needs to be checked. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Post, PostExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The resource type. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpContinueTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpContinueTroubleshooter.md new file mode 100644 index 000000000000..e9cc6bc27bd9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpContinueTroubleshooter.md @@ -0,0 +1,242 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpContinueTroubleshooter + +## SYNOPSIS +Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +\
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. +This API is used after the Troubleshooter has been created using the Create API. + +## SYNTAX + +### ContinueExpanded (Default) +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName + [-Response ] [-StepId ] [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### Continue +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName + -ContinueRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### ContinueViaIdentity +``` +Invoke-AzSelfHelpContinueTroubleshooter -InputObject + -ContinueRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### ContinueViaIdentityExpanded +``` +Invoke-AzSelfHelpContinueTroubleshooter -InputObject + [-Response ] [-StepId ] [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +\
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. +This API is used after the Troubleshooter has been created using the Create API. + +## EXAMPLES + +### Example 1: Continue Troubleshooter to next step +```powershell +$continueRequest = [ordered]@{ + "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" +} + +Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest +``` + +```output +[No Response Body If Success - HttpStatus Code 204] +``` + +If continue is success, you will see no response. +If continue is not success, you will see the error message. +You can see the status of the troubleshooter step by using `Get-AzSelfHelpTroubleshooter` cmdlet. + +## PARAMETERS + +### -ContinueRequestBody +Troubleshooter ContinueRequest body. +To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +Parameter Sets: Continue, ContinueViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: ContinueViaIdentity, ContinueViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Response +. +To construct, see NOTES section for RESPONSE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] +Parameter Sets: ContinueExpanded, ContinueViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Continue, ContinueExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StepId +Unique id of the result. + +```yaml +Type: System.String +Parameter Sets: ContinueExpanded, ContinueViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TroubleshooterName +Troubleshooter resource Name. + +```yaml +Type: System.String +Parameter Sets: Continue, ContinueExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md new file mode 100644 index 000000000000..b6cb6d91e89f --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md @@ -0,0 +1,232 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope + +## SYNOPSIS +Solution discovery using natural language processing. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId ] + [-AdditionalContext ] [-IssueSummary ] [-ResourceId ] [-ServiceId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Post +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -DiscoverSolutionRequest + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### PostViaIdentity +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject + -DiscoverSolutionRequest [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject + [-AdditionalContext ] [-IssueSummary ] [-ResourceId ] [-ServiceId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Solution discovery using natural language processing. + +## EXAMPLES + +### Example 1: Discover Solution using natural language at subscription scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. + +## PARAMETERS + +### -AdditionalContext +Additional information in the form of a string. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiscoverSolutionRequest +Discover NLP request. +To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Parameter Sets: Post, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IssueSummary +Describe the issue with the affected resource. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Provide resourceId of affected resource + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceId +Service Classification id for the resource. +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Post, PostExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md new file mode 100644 index 000000000000..2205c082f1b5 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md @@ -0,0 +1,184 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope + +## SYNOPSIS +Solution discovery using natural language processing. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope [-AdditionalContext ] [-IssueSummary ] + [-ResourceId ] [-ServiceId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### Post +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -DiscoverSolutionRequest + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Solution discovery using natural language processing. + +## EXAMPLES + +### Example 1: Discover Solution using natural language at tenant scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + +## PARAMETERS + +### -AdditionalContext +Additional information in the form of a string. + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiscoverSolutionRequest +Discover NLP request. +To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Parameter Sets: Post +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IssueSummary +Describe the issue with the affected resource. + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Provide resourceId of affected resource + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceId +Service Classification id for the resource. +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpWarmSolutionUp.md b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpWarmSolutionUp.md new file mode 100644 index 000000000000..56d728a725ad --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Invoke-AzSelfHelpWarmSolutionUp.md @@ -0,0 +1,218 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpWarmSolutionUp + +## SYNOPSIS +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## SYNTAX + +### WarmExpanded (Default) +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName [-Parameter ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Warm +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName + -SolutionWarmUpRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### WarmViaIdentity +``` +Invoke-AzSelfHelpWarmSolutionUp -InputObject + -SolutionWarmUpRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### WarmViaIdentityExpanded +``` +Invoke-AzSelfHelpWarmSolutionUp -InputObject [-Parameter ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## EXAMPLES + +### Example 1: Warm up the solution resource +```powershell +$resourceName = "sampleRName" +$parameters = [ordered]@{ + "ProductId" = "13491" +} +Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters +``` + +```output +[No output] +``` + +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: WarmViaIdentity, WarmViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Parameter +Dictionary of \ + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: WarmExpanded, WarmViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Warm, WarmExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionResourceName +Solution resource Name. + +```yaml +Type: System.String +Parameter Sets: Warm, WarmExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionWarmUpRequestBody +Solution WarmUpRequest body +To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +Parameter Sets: Warm, WarmViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpDiagnostic.md new file mode 100644 index 000000000000..c758a3ef206a --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpDiagnostic.md @@ -0,0 +1,196 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic +schema: 2.0.0 +--- + +# New-AzSelfHelpDiagnostic + +## SYNOPSIS +Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + +## SYNTAX + +``` +New-AzSelfHelpDiagnostic -Scope -SResourceName [-GlobalParameter ] + [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + +## EXAMPLES + +### 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. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GlobalParameter +Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Insight +SolutionIds that are needed to be invoked. +To construct, see NOTES section for INSIGHT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Unique resource name for insight resources + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DiagnosticsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..35133cb9b4f3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,205 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution +schema: 2.0.0 +--- + +# New-AzSelfHelpSimplifiedSolution + +## SYNOPSIS +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +\
+ +## SYNTAX + +``` +New-AzSelfHelpSimplifiedSolution -Scope -SResourceName [-Parameter ] + [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. +\
+ +## EXAMPLES + +### Example 1: Create a new simplified solution for a resource +```powershell +$resourceName = "sampleRName" +$solutionId = "9004345-7759" +$parameters = [ordered]@{ + + "SearchText" = "Billing" +} +New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName + +``` + +Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Client input parameters to run Simplified Solutions + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionId +Solution Id to identify single Simplified Solution. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Simplified Solutions Resource Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SimplifiedSolutionsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSolution.md new file mode 100644 index 000000000000..1c2c86acf277 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpSolution.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution +schema: 2.0.0 +--- + +# New-AzSelfHelpSolution + +## SYNOPSIS +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. +In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +\
2. +‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. +‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters + +## SYNTAX + +``` +New-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. +In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +\
2. +‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. +‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters + +## EXAMPLES + +### Example 1: Create New SelfHelp Solution +```powershell +$criteria = [ordered]@{ + "name" ="SolutionId" + "value" = "apollo-cognitve-search-custom-skill" +} + +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} + +New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev +``` + +Creates a SelfHelp Solution for a resource. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Client input parameters to run Solution + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +Solution resource Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SolutionResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerCriterion +Solution request trigger criteria +To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpTroubleshooter.md new file mode 100644 index 000000000000..d2b52f775bd9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/New-AzSelfHelpTroubleshooter.md @@ -0,0 +1,172 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter +schema: 2.0.0 +--- + +# New-AzSelfHelpTroubleshooter + +## SYNOPSIS +Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. + +## SYNTAX + +``` +New-AzSelfHelpTroubleshooter -Name -Scope [-Parameter ] [-SolutionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. + +## EXAMPLES + +### Example 1: New-AzSelfHelpTroubleshooter +```powershell +$parameters = [ordered]@{ + "addParam1"= "/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6" + + } +New-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a +6af-43e1-96d3-bf71f6f5f8ba" -Name "12d59989-f8a9-4b69-9919-1ef51df4eff6" -Parameter $parameters -SolutionId "e104dbdf-9e14-4c9f-bc78-21ac90382231" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +12d59989-f8a9-4b69-9919-1ef51df4eff6 +``` + +Creates new troubleshooter resource. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Troubleshooter resource Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: TroubleshooterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Client input parameters to run Troubleshooter Resource + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionId +Solution Id to identify single troubleshooter. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/README.md b/src/SelfHelp/SelfHelp.Autorest/help/README.md new file mode 100644 index 000000000000..51519d4f03a6 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.SelfHelp` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.SelfHelp` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Restart-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/help/Restart-AzSelfHelpTroubleshooter.md new file mode 100644 index 000000000000..bf040bb10584 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Restart-AzSelfHelpTroubleshooter.md @@ -0,0 +1,161 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter +schema: 2.0.0 +--- + +# Restart-AzSelfHelpTroubleshooter + +## SYNOPSIS +Restarts the troubleshooter API using applicable troubleshooter resource name as the input.\
It returns new resource name which should be used in subsequent request. +The old resource name is obsolete after this API is invoked. + +## SYNTAX + +### Restart (Default) +``` +Restart-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### RestartViaIdentity +``` +Restart-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Restarts the troubleshooter API using applicable troubleshooter resource name as the input.\
It returns new resource name which should be used in subsequent request. +The old resource name is obsolete after this API is invoked. + +## EXAMPLES + +### Example 1: Restarts troubleshooter instance +```powershell +Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +``` + +```output +Location TroubleshooterResourceName + +-------- -------------------------- + + 0b8b324c-be00-410b-988b-175815878690 + + +``` + +Restarts Troubleshooter instance. +It returns new resource name which should be used in subsequent request. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: RestartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Troubleshooter resource Name. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: TroubleshooterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Stop-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/help/Stop-AzSelfHelpTroubleshooter.md new file mode 100644 index 000000000000..5a3694d583d3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Stop-AzSelfHelpTroubleshooter.md @@ -0,0 +1,167 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/stop-azselfhelptroubleshooter +schema: 2.0.0 +--- + +# Stop-AzSelfHelpTroubleshooter + +## SYNOPSIS +Ends the troubleshooter action + +## SYNTAX + +### End (Default) +``` +Stop-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### EndViaIdentity +``` +Stop-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Ends the troubleshooter action + +## EXAMPLES + +### Example 1: End Troubleshooter action +```powershell +Stop-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +``` + +```output +[No Response Body If Success - HttpStatus Code 204] +``` + +It is used to end the troubleshooter resource name that is being executed. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: EndViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Troubleshooter resource Name. + +```yaml +Type: System.String +Parameter Sets: End +Aliases: TroubleshooterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: End +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/help/Update-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/help/Update-AzSelfHelpSolution.md new file mode 100644 index 000000000000..cc4d217d979f --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/help/Update-AzSelfHelpSolution.md @@ -0,0 +1,224 @@ +--- +external help file: +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution +schema: 2.0.0 +--- + +# Update-AzSelfHelpSolution + +## SYNOPSIS +Update the requiredInputs or additional information needed to execute the solution + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSelfHelpSolution -InputObject [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Update the requiredInputs or additional information needed to execute the solution + +## EXAMPLES + +### Example 1: Update the Solution Resource +```powershell +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} +$criteria = [ordered]@{ + "name" =" ReplacementKey" + "value" = "" +} +Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +``` + +```output +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev +``` + +Updates the requiredInputs or additional information needed to execute the solution + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Client input parameters to run Solution + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +Solution resource Name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: SolutionResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerCriterion +Solution request trigger criteria +To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + +## NOTES + +## RELATED LINKS + diff --git a/src/SelfHelp/SelfHelp.Autorest/internal/Az.SelfHelp.internal.psm1 b/src/SelfHelp/SelfHelp.Autorest/internal/Az.SelfHelp.internal.psm1 index 76966a11063a..73ecba12af75 100644 --- a/src/SelfHelp/SelfHelp.Autorest/internal/Az.SelfHelp.internal.psm1 +++ b/src/SelfHelp/SelfHelp.Autorest/internal/Az.SelfHelp.internal.psm1 @@ -24,12 +24,12 @@ # 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 diff --git a/src/SelfHelp/SelfHelp.Autorest/test-module.ps1 b/src/SelfHelp/SelfHelp.Autorest/test-module.ps1 index 6a7b203841e0..c42703f42ddd 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test-module.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test-module.ps1 @@ -74,13 +74,14 @@ try if ($TestMode -ne 'playback') { setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true } $testFolder = Join-Path $PSScriptRoot 'test' if ($null -ne $TestName) { Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") - } else - { + } else { Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") } } Finally @@ -89,6 +90,9 @@ try { cleanupEnv } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } } Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiagnostic.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiagnostic.Recording.json new file mode 100644 index 000000000000..c653bd9756c3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiagnostic.Recording.json @@ -0,0 +1,86 @@ +{ + "Get-AzSelfHelpDiagnostic+[NoContext]+Get+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"insights\": [\n {\n \"solutionId\": \"Demo2InsightV2\"\n }\n ]\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "104" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/ejhfwn3krg/operationResults/2eb92961-0702-454e-ac02-3a4e891883ae?api-version=2024-03-01-preview\u0026t=638479465631905706\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=Rs4mVOqc9S7fNgqEAlEJJcY5IjfDNX7gMHGyHuqjE-aGTwKzv8A2lpK3tTGukq0rhA3tk56IvJtaiZNLS_Kxg4MogCeoCJm7eKBFm1nKB6PuVOnthDVVnI3MYuj81CUHA3BZt0iH6mb7cCphLZ75gxVmfoV6dPuQ7Tt35Rye-ijlN0fyiU940hmYx0CEksjZ2OysyMvWcovh2p72lNuqrMFwFnNALbJMqn7Xj6W41KmC_NS6iArhxxce4sCWkCsZ49Kg3IsDLIYAsQruzLDvVxkjT2FrOgB0-HTVlAIUA1oyoSTGmqQFGFSWGZTmp3f5S2_Q8U_Djoen84LdbPQe2g\u0026h=y_XU3ALuv-AAASE9Dq7qOf7LLyRFM6f78L2G-PC1HJw" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "74" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/ejhfwn3krg/operationResults/2eb92961-0702-454e-ac02-3a4e891883ae?api-version=2024-03-01-preview\u0026t=638479465631905706\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=Rs4mVOqc9S7fNgqEAlEJJcY5IjfDNX7gMHGyHuqjE-aGTwKzv8A2lpK3tTGukq0rhA3tk56IvJtaiZNLS_Kxg4MogCeoCJm7eKBFm1nKB6PuVOnthDVVnI3MYuj81CUHA3BZt0iH6mb7cCphLZ75gxVmfoV6dPuQ7Tt35Rye-ijlN0fyiU940hmYx0CEksjZ2OysyMvWcovh2p72lNuqrMFwFnNALbJMqn7Xj6W41KmC_NS6iArhxxce4sCWkCsZ49Kg3IsDLIYAsQruzLDvVxkjT2FrOgB0-HTVlAIUA1oyoSTGmqQFGFSWGZTmp3f5S2_Q8U_Djoen84LdbPQe2g\u0026h=y_XU3ALuv-AAASE9Dq7qOf7LLyRFM6f78L2G-PC1HJw" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "25a6fd80-d348-423d-ae13-ad274fbfc5ca" ], + "x-ms-correlation-request-id": [ "25a6fd80-d348-423d-ae13-ad274fbfc5ca" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204243Z:25a6fd80-d348-423d-ae13-ad274fbfc5ca" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6749B66158CB43EDB6517416E608B8E4 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:42:42Z" ], + "Date": [ "Fri, 05 Apr 2024 20:42:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "346" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg\",\"name\":\"ejhfwn3krg\",\"type\":\"Microsoft.Help/Diagnostics\",\"properties\":{\"provisioningState\":\"Running\",\"acceptedAt\":\"2024-04-05T20:42:43.1582214Z\"}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpDiagnostic+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "112845a1-541d-4332-a6ab-ed35c9a3eeac" ], + "CommandName": [ "Get-AzSelfHelpDiagnostic" ], + "FullCommandName": [ "Get-AzSelfHelpDiagnostic_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "9211382c-85eb-487f-8472-1a5e315e6636" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "74" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "9211382c-85eb-487f-8472-1a5e315e6636" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204244Z:9211382c-85eb-487f-8472-1a5e315e6636" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F65164E420064ADF9F81E3FD725C9B2B Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:42:43Z" ], + "Date": [ "Fri, 05 Apr 2024 20:42:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2289" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/ejhfwn3krg\",\"name\":\"ejhfwn3krg\",\"type\":\"Microsoft.Help/Diagnostics\",\"properties\":{\"provisioningState\":\"Succeeded\",\"acceptedAt\":\"2024-04-05T20:42:43.1582214Z\",\"diagnostics\":[{\"solutionId\":\"Demo2InsightV2\",\"status\":\"Succeeded\",\"insights\":[{\"id\":\"perfinsights-available-linux\",\"title\":\"Windows Unable to Boot Test hardcoded string for unknown resource (Demo Insight)\",\"results\":\"\u003c!--issueDescription--\u003e\\n\u003cp\u003eWe have detected that PerfInsights is already installed on your VM. You can run PerfInsights on-demand through the Portal and view reports for your analysis.\u003c/p\u003e\\n\u003c!--/issueDescription--\u003e\\n\u003cp\u003ePerfInsights is a diagnostics tool that can help you analyze operating system level metrics such as:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003eBest Practices recommendations for Linux\u003c/li\u003e\\n\u003cli\u003eTop CPU consumers\u003c/li\u003e\\n\u003cli\u003eTop Memory consumers\u003c/li\u003e\\n\u003cli\u003eStorage/RAID/LVM layout\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch2\u003e\u003cstrong\u003eRecommended Steps\u003c/strong\u003e\u003c/h2\u003e\\n\u003cp\u003e\u003ca data-blade=\\\"Microsoft_Azure_Compute.PerformanceDiagnosticsBlade.resourceId.$resourceId\\\" button-data-blade=\\\"button-data-blade\\\"\u003eRun PerfInsights\u003c/a\u003e\u003c/p\u003e\\n\u003cp\u003eFor the machine \u003c!--$vmname--\u003e[vmname]\u003c!--/$vmname--\u003e, you can \u003ca href=\\\"https://portal.azure.com/#@microsoft.onmicrosoft.com/resource/{$resourceIdDecoded}/performanceDiagnostics\\\"\u003eaccess PerfInsights here\u003c/a\u003e and review results directly in the Azure portal.\u003c/p\u003e\\n\u003cp\u003eYou may also \u003ca href=\\\"https://docs.microsoft.com/azure/virtual-machines/troubleshooting/performance-diagnostics#install-and-run-performance-diagnostics-on-your-vm\\\"\u003edownload PerfInsights\u003c/a\u003e and run it on your virtual machine.\u003c/p\u003e\\n\u003cp\u003eIf you open a support case, attach the PerfInsights report for the Support Engineer to analyze.\u003c/p\u003e\\n\u003ch2\u003e\u003cstrong\u003eRecommended Documents\u003c/strong\u003e\u003c/h2\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/virtual-machines/troubleshooting/how-to-use-perfinsights\\\"\u003eHow to use PerfInsights\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-performance-bottlenecks-linux\\\"\u003eTroubleshoot performance and isolate bottlenecks in Linux\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\",\"importanceLevel\":\"Warning\"}]}]}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Recording.json index d2422440307c..0706e69fc547 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Recording.json +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzSelfHelpDiscoverySolution+[NoContext]+List+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/l1ca7pfg5b/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/discoverySolutions?api-version=2023-09-01-preview\u0026$filter=ProblemClassificationId eq \u0027a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\u0027+1": { + "Get-AzSelfHelpDiscoverySolution+[NoContext]+List+$GET+https://management.azure.com/providers/Microsoft.Help/discoverySolutions?api-version=2024-03-01-preview\u0026$filter=ProblemClassificationId eq \u0027a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\u0027+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/l1ca7pfg5b/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/discoverySolutions?api-version=2023-09-01-preview\u0026$filter=ProblemClassificationId%20eq%20\u0027a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\u0027", + "RequestUri": "https://management.azure.com/providers/Microsoft.Help/discoverySolutions?api-version=2024-03-01-preview\u0026$filter=ProblemClassificationId%20eq%20\u0027a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\u0027", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "f8975f7e-657f-47af-ab6b-a0ec9dc5fc5e" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "09ba3e04-143f-4aac-a475-347f79690069" ], "CommandName": [ "Get-AzSelfHelpDiscoverySolution" ], "FullCommandName": [ "Get-AzSelfHelpDiscoverySolution_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v9.0.1", "PSVersion/v7.2.14", "Az.SelfHelp/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -23,23 +23,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], - "x-ms-request-id": [ "d773b455-0455-41f3-abf3-92ad53cb9c5b" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5a66693d-fdf0-47ec-b05d-062a7a37592d" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-correlation-request-id": [ "d773b455-0455-41f3-abf3-92ad53cb9c5b" ], - "x-ms-routing-request-id": [ "EASTUS:20230929T174138Z:d773b455-0455-41f3-abf3-92ad53cb9c5b" ], + "x-ms-correlation-request-id": [ "5a66693d-fdf0-47ec-b05d-062a7a37592d" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204259Z:5a66693d-fdf0-47ec-b05d-062a7a37592d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 53E9D65E75E543E3B3E7A2BE85A57B2C Ref B: BN1AA2051014029 Ref C: 2023-09-29T17:41:38Z" ], - "Date": [ "Fri, 29 Sep 2023 17:41:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4F1C4B97D0CB4F56B41B013E3F63C10D Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:42:59Z" ], + "Date": [ "Fri, 05 Apr 2024 20:42:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "704" ], + "Content-Length": [ "545" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/l1ca7pfg5b/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/discoverySolutions/a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\",\"name\":\"a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\",\"type\":\"Microsoft.Help/discoverySolutions\",\"properties\":{\"solutions\":[{\"solutionId\":\"apollo-storage-blob-archiving\",\"solutionType\":\"Solutions\",\"description\":\"Řešení potíží s přesunem dat do archivní úrovně\"},{\"solutionId\":\"StorageAccountTierInsight\",\"solutionType\":\"Diagnostics\",\"description\":\"Diagnostic to show which tiers a storage account supports for.\",\"requiredInputs\":[\"SapId\",\"ResourceUri\"]}]}}]}", + "Content": "{\"value\":[{\"id\":\"/providers/Microsoft.Help/discoverySolutions/a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\",\"name\":\"a5db90c3-f147-bce6-83b0-ab5e0aeca1f0\",\"type\":\"Microsoft.Help/discoverySolutions\",\"properties\":{\"solutions\":[{\"solutionId\":\"apollo-storage-blob-archiving\",\"solutionType\":\"Solutions\",\"description\":\"Resolve issues moving data to archive tier\"},{\"solutionId\":\"StorageAccountTierInsight\",\"solutionType\":\"Diagnostics\",\"description\":\"Diagnostic to show which tiers a storage account supports for.\",\"requiredInputs\":[\"SapId\",\"ResourceUri\"]}]}}]}", "isContentBase64": false } } diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Tests.ps1 index 6f1cca282d37..bd8adb45220d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpDiscoverySolution.Tests.ps1 @@ -4,6 +4,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpDiscoverySoluti if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } + . ($loadEnvPath) $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSelfHelpDiscoverySolution.Recording.json' $currentPath = $PSScriptRoot @@ -14,10 +15,10 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpDiscoverySoluti . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzSelfHelpDiscoverySolution' { +Describe 'Get-AzSelfHelpDiscoverySolution' -Tag 'LiveOnly'{ It 'List' { { - Get-AzSelfHelpDiscoverySolution -Scope $env.scope -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" + Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" } | Should -Not -Throw } -} +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Recording.json new file mode 100644 index 000000000000..c67b7f055b67 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Recording.json @@ -0,0 +1,174 @@ +{ + "Get-AzSelfHelpSimplifiedSolution+[NoContext]+Get+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"9004345-7759\",\n \"parameters\": {\n \"SearchText\": \"Billing\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "115" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o/operationResults/7254c86a-daa3-4ee3-aaff-f2efe48f1e8e?api-version=2024-03-01-preview\u0026t=638479465954737490\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=heY1SMpskqHAWwaxSsRtpHwu5cS0JNF8wwWbh8LvzJvnv2ie4f97682ta3UoGMMXxvAJuzUOzYl6fUHvfVgurLTanPu4IF6tpvkWqaac-i00mf9j2eq1l3cFZ-iyLaYNpPGYwY8keR8FPPfJ0_a7rMa9j1Pe8NlT8P_nkE2XmkREQR6syXzXEFq6azIcJ91MfNmaZd60qfkH32riq7xpsx-qSpc1J-3ulTyYr1FH5MxB6iHPkCwX9Hm8azB7Ynb4fIvOXcoWpGdOVdHFdEmn-O2UKGtsroRYmXPEeZXAm1uESJ1muakHAADj3bi5-ePrHPlcFmUQFcOX5L1ehPZ5yQ\u0026h=qsM9J1gz_uhuV6_XsLwxqIG-6Da2Yp57v0HaCA9ICb0" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o/operationResults/7254c86a-daa3-4ee3-aaff-f2efe48f1e8e?api-version=2024-03-01-preview\u0026t=638479465954580457\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=ViOJ59INKFGm3qKJQ7Q0R8PbQ-yxgdh2CqRcamXUMK6srmC66bI82VuDcIlT0iitSa1e_P9QFJ3dlgoD3nlSepuO8xfB5ttu2jGfFDHjlGkI8_ZzVWAI8dcZyalTqx-Wvef6oYcmPNZjpvtWQgw1H5HfIKem2SrR2_hA9xekSn9UFYEiNZVoARj_Fks9Ln8IcgvhhRHmKyleMG6BUfe_J-4da5j9Ia9fUTU7S-VZqt8QKjqjTHLwmThxXYoUIqUZB1Sik1AYpTYnyAC-XeniOhajLLouo9XOWTZ607Lh2zgtPr7AO3vvEnD48OC7fDeEn_gOgXWORoJaUZegS13H7g\u0026h=hIsKlymJkHXICvjZBQxZB3H17SLOdJ7g9klrucir9LE" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "64e55c83-ae50-4e43-8f72-bd55b12f4800" ], + "x-ms-correlation-request-id": [ "64e55c83-ae50-4e43-8f72-bd55b12f4800" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204315Z:64e55c83-ae50-4e43-8f72-bd55b12f4800" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8E764B549DE7426E8829AA07AA4B552C Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:43:14Z" ], + "Date": [ "Fri, 05 Apr 2024 20:43:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o\",\"name\":\"zmw3l2xp7o\",\"type\":\"Microsoft.Help/simplifiedSolutions\",\"properties\":{\"title\":\"Catch-all: Microsoft Graph API issues\",\"content\":\"\u003ch2\u003eTroubleshoot issues with the Microsoft Graph API\u003c/h2\u003e\\n\u003cp\u003e\u003cstrong\u003eNotice:\u003c/strong\u003e Azure Active Directory (Azure AD) is being renamed to Microsoft Entra ID. No customer action is required. Capabilities, licensing, pricing, service level agreements, APIs, authentication and developer experiences are not impacted. \u003ca href=\\\"https://learn.microsoft.com/azure/active-directory/fundamentals/new-name\\\"\u003eLearn more\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eUse the following guidance to troubleshoot Microsoft Graph API issues, including issues related to authentication, authorization, and API. You\u0027ll also find information about the end of support for Azure AD Authentication Library (ADAL) and Azure AD Graph API.\u003c/p\u003e\\n\u003cp\u003eScan the following headings and select one or more that will help resolve your issue.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eEnd of support for Azure AD Graph API and Azure Active Directory Authentication Library\u003c/h2\u003e\u003ch3\u003eAzure Active Directory Graph API deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure AD Graph APIs will be retired by March 30, 2024.\u003c/em\u003e See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e. We want to make sure that all customers migrate off and discourage applications from taking production dependencies on Azure AD Graph. Investments in the new features and functionalities will be made only to \u003ca href=\\\"https://learn.microsoft.com/graph/overview\\\"\u003eMicrosoft Graph\u003c/a\u003e. Going forward, we\u0027ll continue to support Azure AD Graph with security-related fixes.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing migration from Azure AD Graph to Microsoft Graph. For more information, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003eMigrate Azure AD Graph apps to Microsoft Graph - Microsoft Graph | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eMicrosoft Entra ID and MSOnline PowerShell deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell cmdlets will be retired by March 30, 2024 See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e.\u003c/em\u003e The three modules will continue to work with minimal investment, apart from security updates.\u003c/p\u003e\\n\u003cp\u003eWe encourage you to continue migrating to The Microsoft Graph PowerShell SDK because that continues to be where all our current and future PowerShell investments are being made. We\u0027re also working on tools and documentation for migrating existing scripts and PowerShell processes that rely on the Azure AD Graph and MSOnline module to the Microsoft Graph PowerShell SDK.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0\\\"\u003eFind Microsoft Entra ID and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs\u003c/a\u003e and \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0\\\"\u003eMigrate from Azure AD PowerShell to the Microsoft Graph PowerShell SDK | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eAzure Active Directory Authentication Library retirement\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure Active Directory Authentication Library (ADAL) end-of-support is on June 30, 2023\u003c/em\u003e. While existing ADAL apps may continue to work, no support or security fixes will be provided past end-of-life. In addition, there are no planned ADAL releases prior to end-of-life for features, or planned support for new platform versions.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing the migration of your applications to Microsoft Authentication Library (MSAL). For more information about ADAL to MSAL migration, see \u003ca href=\\\"https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration\\\"\u003eMigrate to the Microsoft Authentication Library - Microsoft Entra | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454\\\"\u003eSeptember 2022 change announcements\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eVideos: Migrating from Azure AD Graph to Microsoft Graph\u003c/h3\u003e\\n\u003cp\u003eThe following videos explain more about migrating from Azure AD Graph to Microsoft Graph.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-video-group-container\\\"\\\"\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/iKK-F2PyoQU?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph to Microsoft Graph\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/oiXMv0xoH1s?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph and MSOL PowerShell to MS Graph PowerShell\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eTroubleshoot Microsoft Graph API issues\u003c/h2\u003e\u003cp\u003eUse the following troubleshooting guidance to resolve Microsoft Graph API issues.\u003c/p\u003e\\n\u003ch3\u003eAzure AD Graph migration\u003c/h3\u003e\\n\u003cp\u003eFor applications using Azure AD Graph, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003emigrate Azure AD Graph apps to Microsoft Graph\u003c/a\u003e.\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eStart with the \u003ca href=\\\"https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist\\\"\u003eapp migration planning checklist\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYour Azure app registration portal shows which applications use Azure AD Graph.\u003c/li\u003e\\n\u003cli\u003eReview your apps source code, and if applicable, contact independent software vendors (ISVs) or app providers. Microsoft support can provide a list of Azure AD Graph usage in your tenant.\u003c/li\u003e\\n\u003cli\u003eIf you\u0027re having issues, post a question on \u003ca href=\\\"https://learn.microsoft.com/en-us/answers/topics/azure-ad-graph-deprecation.html\\\"\u003eMicrosoft Q\u0026amp;A\u003c/a\u003e and tag it with \u003ccode\u003eazure-ad-graph-deprecation\u003c/code\u003e, or post your question on \u003ca href=\\\"https://stackoverflow.com/questions/ask\\\"\u003eStackOverflow\u003c/a\u003e with the \u003ccode\u003eazureadgraph-deprecation\u003c/code\u003e tag.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003cp\u003eReview the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-faq\\\"\u003eAzure AD Graph to Microsoft Graph migration frequently asked questions\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-registration-config-grant-permissions-how-to/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eConfigure how users consent to applications\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-delegated-and-app-perms/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eHow to recognize differences between delegated and application permissions\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eUpgrade from Microsoft Entra ID and MSOnline PowerShell to Microsoft Graph PowerShell\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#why-upgrade-to-microsoft-graph-powershell\\\"\u003eWhy upgrade to Microsoft Graph PowerShell?\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#upgrading-to-microsoft-graph-powershell\\\"\u003eSteps to follow when upgrading to MS Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#limitations\\\"\u003eLimitations\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eCmdlet mappings from Microsoft Entra ID and MSOnline PowerShell modules to MS Graph PowerShell module\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#azure-ad-to-microsoft-graph-powershell-by-category\\\"\u003eMicrosoft Entra ID to Microsoft Graph PowerShell by category\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#msonline-to-microsoft-graph-powershell\\\"\u003eMSOnline to Microsoft Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eAuthentication or authorization issues\u003c/h3\u003e\\n\u003cp\u003eSee the following resources to resolve authentication or authorization issues:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cp\u003eAuthorization errors can occur for several reasons, most of which generate a 403 error, with a few exceptions. For example, the following scenarios can lead to authorization errors:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-scenarios\\\"\u003eIncorrect access token acquisition flows\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-scopes\\\"\u003ePoorly configured permission scopes\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview#understanding-user-and-admin-consent\\\"\u003eLack of consent\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent\\\"\u003eLack of permissions\u003c/a\u003e \u003cbr\u003e\\nFor more information, see \u003ca href=\\\"https://docs.microsoft.com/graph/resolve-auth-errors\\\"\u003eResolve Microsoft Graph authorization errors\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to implement the OAuth 2.0 authorization code grant flow. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-user\\\"\u003eGet access on behalf of a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to program directly against the code grant (PKCE) flow in your application using any language, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow\\\"\u003eMicrosoft identity platform and OAuth 2.0 authorization code flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eConfigure a service and use the OAuth client credentials grant flow to get an access token. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-service\\\"\u003eGet access without a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the client credentials flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow\\\"\u003eMicrosoft identity platform and the OAuth 2.0 client credentials flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the resource owner password credential (ROPC) flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc\\\"\u003eMicrosoft identity platform and OAuth 2.0 resource owner password credentials\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eThe Microsoft identity platform only supports ROPC for Microsoft Entra tenants, not personal accounts. This means that you must use a tenant-specific endpoint, for example, \u0026quot;//login.microsoftonline.com/{TenantId_or_Name}\u0026quot; or the \u003cem\u003eorganization\u0027s\u003c/em\u003e endpoint.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003ePersonal accounts that are invited to a Microsoft Entra tenant can\u0027t use ROPC.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAccounts that don\u0027t have passwords can\u0027t sign in through ROPC. In this case, we recommend using a different flow for your app.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eIf users need to use \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/authentication/concept-mfa-howitworks\\\"\u003emultifactor authentication (MFA)\u003c/a\u003e to sign in to the application, they\u0027ll be blocked instead.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eROPC is not supported in \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/whatis-fed\\\"\u003ehybrid identity federation\u003c/a\u003e scenarios. For example, Microsoft Entra ID and Active Directory Federation Services (AD FS) previously authenticated on-premises accounts. If users are full-page redirected to an on-premises identity provider, Microsoft Entra ID is not able to test the username and password against that identity provider. \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-pta\\\"\u003ePass-through authentication\u003c/a\u003e is supported with ROPC, however.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAn exception to a hybrid identity federation scenario would be the following: home realm discovery (HRD) policy with \u003ccode\u003eAllowCloudPasswordValidation\u003c/code\u003e set to \u003ccode\u003eTRUE\u003c/code\u003e will enable ROPC flow to work for federated users when the on-premises password is synced to the cloud. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/manage-apps/configure-authentication-for-federated-users-portal#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications\\\"\u003eEnable direct ROPC authentication of federated users for legacy applications\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eQuery data from API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Graph supports optional query parameters you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints. See \u003ca href=\\\"https://docs.microsoft.com/graph/query-parameters#odata-system-query-options\\\"\u003eUse query parameters to customize responses\u003c/a\u003e for more information.\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta\\\"\u003euser resource type\u003c/a\u003e. This represents a Microsoft Entra user account and inherits from directoryObject. For performance reasons, the \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-post-users?view=graph-rest-beta\\\"\u003ecreate\u003c/a\u003e, \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-get?view=graph-rest-beta\\\"\u003eget\u003c/a\u003e, and \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-list?view=graph-rest-beta\\\"\u003elist\u003c/a\u003e operations return only a subset of more commonly used properties by default. These default properties are noted in the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta#properties\\\"\u003eproperties\u003c/a\u003e section. To get any of the properties that are not returned by default, specify them in a \u003ccode\u003e$select\u003c/code\u003e OData query option.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/attachment?view=graph-rest-1.0\\\"\u003eattachment resource type\u003c/a\u003e. You can add related content to a user event, message, or post in the form of an attachment. Attachment is the base resource for the following derived types of attachments:\\n\u003cul\u003e\\n\u003cli\u003eA file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/fileattachment?view=graph-rest-1.0\\\"\u003efileAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eAn item (contact, event or message, represented by an \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/itemattachment?view=graph-rest-1.0\\\"\u003eitemAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eA link to a file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/referenceattachment?view=graph-rest-1.0\\\"\u003ereferenceAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/schemaextension?view=graph-rest-1.0\\\"\u003eschemaExtension resource type (schema extensions)\u003c/a\u003e. Schema extensions allow you to define a schema to extend and add strongly typed custom data to a resource type. The custom data appears as a complex type on the extended resource. See the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eschema extension example\u003c/a\u003e to learn how to add custom data to groups.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eMicrosoft Graph API endpoints\u003c/h3\u003e\\n\u003cp\u003eSee the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide\\\"\u003eOffice 365 URLs and IP address ranges\u003c/a\u003e - This article contains most of the endpoints for Azure and M365, including Azure and Microsoft Graph.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0\\\"\u003eMicrosoft Graph REST API v1.0 reference\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-beta#call-the-v10-endpoint\\\"\u003eMicrosoft Graph beta endpoint reference\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eReports and logs\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Entra ID tracks user activity and creates reports that help you understand how your users access and use Microsoft Entra services. Use the Microsoft Graph API for Microsoft Entra ID to analyze the data in these reports and to create custom solutions tailored to your organization\u0027s specific needs. The availability of these activity reports is governed by the Microsoft Entra data retention policies.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eFor more information, see:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0\\\"\u003eActivity reports API overview\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-long-does-azure-ad-store-the-data\\\"\u003eData retention policies\u003c/a\u003e.\u003cbr\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cul\u003e\\n\u003cli\u003eWith Microsoft Graph, you can access Microsoft 365 usage reports resources to get information about how people in your business are using Microsoft 365 services. For example, you can identify who\u0027s using a service a lot and reaching quotas, or who may not need a Microsoft 365 license at all, see \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eWorking with Microsoft 365 usage reports in Microsoft Graph\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eExpose a web API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-expose-web-apis\\\"\u003eQuickStart: Configure an application to expose a web API\u003c/a\u003e. In this QuickStart, register a web API with the Microsoft identity platform and expose it to client apps by adding an example scope. By registering your web API and exposing it through scopes, you can provide permission-based access to its resources to authorized users and client apps that access your API.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eCommon issues and solutions\u003c/h2\u003e\u003ch3\u003eThe API I\u0027m calling doesn\u0027t work\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eTest Microsoft Graph APIs in your tenant or a demo tenant. Also, check out the sample queries in \u003ca href=\\\"https://developer.microsoft.com/graph/graph-explorer\\\"\u003eMicrosoft Graph Explorer\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eLearn how to configure the code for your daemon application that calls web APIs, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/scenario-daemon-app-configuration?tabs=dotnet\\\"\u003eDaemon app that calls web APIs - code configuration\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I check the status of service availability and connectivity?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eThe service availability and connectivity of the underlying services that can be accessed through Microsoft Graph can impact on the overall availability and performance of Microsoft Graph.\\n\u003cul\u003e\\n\u003cli\u003eFor Microsoft Entra service health, check the status of \u003cstrong\u003eSecurity + Identity\u003c/strong\u003e services listed in the \u003ca href=\\\"https://azure.microsoft.com/status/\\\"\u003eAzure status page\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eFor Office services that contribute to Microsoft Graph, check the status of services listed in the \u003ca href=\\\"https://portal.office.com/adminportal/home#/servicehealth\\\"\u003eOffice Service Health Dashboard\u003c/a\u003e. Microsoft Graph authorization errors can be a result of several issues, most of which generate a 401 or 403 error.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I find more information on errors and known issues?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/errors\\\"\u003eMicrosoft Graph error response information\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/known-issues\\\"\u003eKnown issues with Microsoft Graph\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003cdiv class=\\\"simplified-solution-web-results-container\\\"\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eAzure Docs\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/en-us/azure/programmable-connectivity/azure-programmable-connectivity-billing\\\" target=\\\"_blank\\\"\u003eConsolidated Billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003e...billing, enabling developers to receive a unified invoice from Azure for all their API plans, rather than managing separate bills from various operators. This streamlined approach not only reduces ...\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eCommunity\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/answers/questions/928000/\\\" target=\\\"_blank\\\"\u003eazure billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003eI was cancelled my subscription but still it is billing.\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\",\"provisioningState\":\"Succeeded\",\"appendix\":{}}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSimplifiedSolution+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o/operationResults/7254c86a-daa3-4ee3-aaff-f2efe48f1e8e?api-version=2024-03-01-preview\u0026t=638479465954580457\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=ViOJ59INKFGm3qKJQ7Q0R8PbQ-yxgdh2CqRcamXUMK6srmC66bI82VuDcIlT0iitSa1e_P9QFJ3dlgoD3nlSepuO8xfB5ttu2jGfFDHjlGkI8_ZzVWAI8dcZyalTqx-Wvef6oYcmPNZjpvtWQgw1H5HfIKem2SrR2_hA9xekSn9UFYEiNZVoARj_Fks9Ln8IcgvhhRHmKyleMG6BUfe_J-4da5j9Ia9fUTU7S-VZqt8QKjqjTHLwmThxXYoUIqUZB1Sik1AYpTYnyAC-XeniOhajLLouo9XOWTZ607Lh2zgtPr7AO3vvEnD48OC7fDeEn_gOgXWORoJaUZegS13H7g\u0026h=hIsKlymJkHXICvjZBQxZB3H17SLOdJ7g9klrucir9LE+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o/operationResults/7254c86a-daa3-4ee3-aaff-f2efe48f1e8e?api-version=2024-03-01-preview\u0026t=638479465954580457\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=ViOJ59INKFGm3qKJQ7Q0R8PbQ-yxgdh2CqRcamXUMK6srmC66bI82VuDcIlT0iitSa1e_P9QFJ3dlgoD3nlSepuO8xfB5ttu2jGfFDHjlGkI8_ZzVWAI8dcZyalTqx-Wvef6oYcmPNZjpvtWQgw1H5HfIKem2SrR2_hA9xekSn9UFYEiNZVoARj_Fks9Ln8IcgvhhRHmKyleMG6BUfe_J-4da5j9Ia9fUTU7S-VZqt8QKjqjTHLwmThxXYoUIqUZB1Sik1AYpTYnyAC-XeniOhajLLouo9XOWTZ607Lh2zgtPr7AO3vvEnD48OC7fDeEn_gOgXWORoJaUZegS13H7g\u0026h=hIsKlymJkHXICvjZBQxZB3H17SLOdJ7g9klrucir9LE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "c506cd8a-e366-48da-bdd1-f18e6751a027" ], + "CommandName": [ "New-AzSelfHelpSimplifiedSolution" ], + "FullCommandName": [ "New-AzSelfHelpSimplifiedSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "e654919f-a001-4fdb-8f0a-1882a760fb83" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "e654919f-a001-4fdb-8f0a-1882a760fb83" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204345Z:e654919f-a001-4fdb-8f0a-1882a760fb83" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 894EA4A609A142D392F011B3AF0DC154 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:43:45Z" ], + "Date": [ "Fri, 05 Apr 2024 20:43:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "237" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o/operationResults/7254c86a-daa3-4ee3-aaff-f2efe48f1e8e\",\"name\":\"7254c86a-daa3-4ee3-aaff-f2efe48f1e8e\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSimplifiedSolution+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "c506cd8a-e366-48da-bdd1-f18e6751a027" ], + "CommandName": [ "New-AzSelfHelpSimplifiedSolution" ], + "FullCommandName": [ "New-AzSelfHelpSimplifiedSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "a94cf60c-2d27-453b-ac09-b1e74400abe8" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "a94cf60c-2d27-453b-ac09-b1e74400abe8" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204346Z:a94cf60c-2d27-453b-ac09-b1e74400abe8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 47172C054D304C4C88EF637FBB028FCB Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:43:45Z" ], + "Date": [ "Fri, 05 Apr 2024 20:43:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o\",\"name\":\"zmw3l2xp7o\",\"type\":\"Microsoft.Help/simplifiedSolutions\",\"properties\":{\"title\":\"Catch-all: Microsoft Graph API issues\",\"content\":\"\u003ch2\u003eTroubleshoot issues with the Microsoft Graph API\u003c/h2\u003e\\n\u003cp\u003e\u003cstrong\u003eNotice:\u003c/strong\u003e Azure Active Directory (Azure AD) is being renamed to Microsoft Entra ID. No customer action is required. Capabilities, licensing, pricing, service level agreements, APIs, authentication and developer experiences are not impacted. \u003ca href=\\\"https://learn.microsoft.com/azure/active-directory/fundamentals/new-name\\\"\u003eLearn more\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eUse the following guidance to troubleshoot Microsoft Graph API issues, including issues related to authentication, authorization, and API. You\u0027ll also find information about the end of support for Azure AD Authentication Library (ADAL) and Azure AD Graph API.\u003c/p\u003e\\n\u003cp\u003eScan the following headings and select one or more that will help resolve your issue.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eEnd of support for Azure AD Graph API and Azure Active Directory Authentication Library\u003c/h2\u003e\u003ch3\u003eAzure Active Directory Graph API deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure AD Graph APIs will be retired by March 30, 2024.\u003c/em\u003e See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e. We want to make sure that all customers migrate off and discourage applications from taking production dependencies on Azure AD Graph. Investments in the new features and functionalities will be made only to \u003ca href=\\\"https://learn.microsoft.com/graph/overview\\\"\u003eMicrosoft Graph\u003c/a\u003e. Going forward, we\u0027ll continue to support Azure AD Graph with security-related fixes.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing migration from Azure AD Graph to Microsoft Graph. For more information, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003eMigrate Azure AD Graph apps to Microsoft Graph - Microsoft Graph | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eMicrosoft Entra ID and MSOnline PowerShell deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell cmdlets will be retired by March 30, 2024 See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e.\u003c/em\u003e The three modules will continue to work with minimal investment, apart from security updates.\u003c/p\u003e\\n\u003cp\u003eWe encourage you to continue migrating to The Microsoft Graph PowerShell SDK because that continues to be where all our current and future PowerShell investments are being made. We\u0027re also working on tools and documentation for migrating existing scripts and PowerShell processes that rely on the Azure AD Graph and MSOnline module to the Microsoft Graph PowerShell SDK.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0\\\"\u003eFind Microsoft Entra ID and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs\u003c/a\u003e and \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0\\\"\u003eMigrate from Azure AD PowerShell to the Microsoft Graph PowerShell SDK | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eAzure Active Directory Authentication Library retirement\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure Active Directory Authentication Library (ADAL) end-of-support is on June 30, 2023\u003c/em\u003e. While existing ADAL apps may continue to work, no support or security fixes will be provided past end-of-life. In addition, there are no planned ADAL releases prior to end-of-life for features, or planned support for new platform versions.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing the migration of your applications to Microsoft Authentication Library (MSAL). For more information about ADAL to MSAL migration, see \u003ca href=\\\"https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration\\\"\u003eMigrate to the Microsoft Authentication Library - Microsoft Entra | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454\\\"\u003eSeptember 2022 change announcements\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eVideos: Migrating from Azure AD Graph to Microsoft Graph\u003c/h3\u003e\\n\u003cp\u003eThe following videos explain more about migrating from Azure AD Graph to Microsoft Graph.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-video-group-container\\\"\\\"\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/iKK-F2PyoQU?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph to Microsoft Graph\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/oiXMv0xoH1s?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph and MSOL PowerShell to MS Graph PowerShell\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eTroubleshoot Microsoft Graph API issues\u003c/h2\u003e\u003cp\u003eUse the following troubleshooting guidance to resolve Microsoft Graph API issues.\u003c/p\u003e\\n\u003ch3\u003eAzure AD Graph migration\u003c/h3\u003e\\n\u003cp\u003eFor applications using Azure AD Graph, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003emigrate Azure AD Graph apps to Microsoft Graph\u003c/a\u003e.\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eStart with the \u003ca href=\\\"https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist\\\"\u003eapp migration planning checklist\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYour Azure app registration portal shows which applications use Azure AD Graph.\u003c/li\u003e\\n\u003cli\u003eReview your apps source code, and if applicable, contact independent software vendors (ISVs) or app providers. Microsoft support can provide a list of Azure AD Graph usage in your tenant.\u003c/li\u003e\\n\u003cli\u003eIf you\u0027re having issues, post a question on \u003ca href=\\\"https://learn.microsoft.com/en-us/answers/topics/azure-ad-graph-deprecation.html\\\"\u003eMicrosoft Q\u0026amp;A\u003c/a\u003e and tag it with \u003ccode\u003eazure-ad-graph-deprecation\u003c/code\u003e, or post your question on \u003ca href=\\\"https://stackoverflow.com/questions/ask\\\"\u003eStackOverflow\u003c/a\u003e with the \u003ccode\u003eazureadgraph-deprecation\u003c/code\u003e tag.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003cp\u003eReview the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-faq\\\"\u003eAzure AD Graph to Microsoft Graph migration frequently asked questions\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-registration-config-grant-permissions-how-to/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eConfigure how users consent to applications\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-delegated-and-app-perms/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eHow to recognize differences between delegated and application permissions\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eUpgrade from Microsoft Entra ID and MSOnline PowerShell to Microsoft Graph PowerShell\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#why-upgrade-to-microsoft-graph-powershell\\\"\u003eWhy upgrade to Microsoft Graph PowerShell?\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#upgrading-to-microsoft-graph-powershell\\\"\u003eSteps to follow when upgrading to MS Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#limitations\\\"\u003eLimitations\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eCmdlet mappings from Microsoft Entra ID and MSOnline PowerShell modules to MS Graph PowerShell module\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#azure-ad-to-microsoft-graph-powershell-by-category\\\"\u003eMicrosoft Entra ID to Microsoft Graph PowerShell by category\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#msonline-to-microsoft-graph-powershell\\\"\u003eMSOnline to Microsoft Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eAuthentication or authorization issues\u003c/h3\u003e\\n\u003cp\u003eSee the following resources to resolve authentication or authorization issues:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cp\u003eAuthorization errors can occur for several reasons, most of which generate a 403 error, with a few exceptions. For example, the following scenarios can lead to authorization errors:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-scenarios\\\"\u003eIncorrect access token acquisition flows\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-scopes\\\"\u003ePoorly configured permission scopes\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview#understanding-user-and-admin-consent\\\"\u003eLack of consent\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent\\\"\u003eLack of permissions\u003c/a\u003e \u003cbr\u003e\\nFor more information, see \u003ca href=\\\"https://docs.microsoft.com/graph/resolve-auth-errors\\\"\u003eResolve Microsoft Graph authorization errors\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to implement the OAuth 2.0 authorization code grant flow. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-user\\\"\u003eGet access on behalf of a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to program directly against the code grant (PKCE) flow in your application using any language, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow\\\"\u003eMicrosoft identity platform and OAuth 2.0 authorization code flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eConfigure a service and use the OAuth client credentials grant flow to get an access token. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-service\\\"\u003eGet access without a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the client credentials flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow\\\"\u003eMicrosoft identity platform and the OAuth 2.0 client credentials flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the resource owner password credential (ROPC) flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc\\\"\u003eMicrosoft identity platform and OAuth 2.0 resource owner password credentials\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eThe Microsoft identity platform only supports ROPC for Microsoft Entra tenants, not personal accounts. This means that you must use a tenant-specific endpoint, for example, \u0026quot;//login.microsoftonline.com/{TenantId_or_Name}\u0026quot; or the \u003cem\u003eorganization\u0027s\u003c/em\u003e endpoint.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003ePersonal accounts that are invited to a Microsoft Entra tenant can\u0027t use ROPC.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAccounts that don\u0027t have passwords can\u0027t sign in through ROPC. In this case, we recommend using a different flow for your app.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eIf users need to use \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/authentication/concept-mfa-howitworks\\\"\u003emultifactor authentication (MFA)\u003c/a\u003e to sign in to the application, they\u0027ll be blocked instead.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eROPC is not supported in \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/whatis-fed\\\"\u003ehybrid identity federation\u003c/a\u003e scenarios. For example, Microsoft Entra ID and Active Directory Federation Services (AD FS) previously authenticated on-premises accounts. If users are full-page redirected to an on-premises identity provider, Microsoft Entra ID is not able to test the username and password against that identity provider. \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-pta\\\"\u003ePass-through authentication\u003c/a\u003e is supported with ROPC, however.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAn exception to a hybrid identity federation scenario would be the following: home realm discovery (HRD) policy with \u003ccode\u003eAllowCloudPasswordValidation\u003c/code\u003e set to \u003ccode\u003eTRUE\u003c/code\u003e will enable ROPC flow to work for federated users when the on-premises password is synced to the cloud. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/manage-apps/configure-authentication-for-federated-users-portal#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications\\\"\u003eEnable direct ROPC authentication of federated users for legacy applications\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eQuery data from API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Graph supports optional query parameters you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints. See \u003ca href=\\\"https://docs.microsoft.com/graph/query-parameters#odata-system-query-options\\\"\u003eUse query parameters to customize responses\u003c/a\u003e for more information.\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta\\\"\u003euser resource type\u003c/a\u003e. This represents a Microsoft Entra user account and inherits from directoryObject. For performance reasons, the \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-post-users?view=graph-rest-beta\\\"\u003ecreate\u003c/a\u003e, \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-get?view=graph-rest-beta\\\"\u003eget\u003c/a\u003e, and \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-list?view=graph-rest-beta\\\"\u003elist\u003c/a\u003e operations return only a subset of more commonly used properties by default. These default properties are noted in the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta#properties\\\"\u003eproperties\u003c/a\u003e section. To get any of the properties that are not returned by default, specify them in a \u003ccode\u003e$select\u003c/code\u003e OData query option.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/attachment?view=graph-rest-1.0\\\"\u003eattachment resource type\u003c/a\u003e. You can add related content to a user event, message, or post in the form of an attachment. Attachment is the base resource for the following derived types of attachments:\\n\u003cul\u003e\\n\u003cli\u003eA file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/fileattachment?view=graph-rest-1.0\\\"\u003efileAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eAn item (contact, event or message, represented by an \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/itemattachment?view=graph-rest-1.0\\\"\u003eitemAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eA link to a file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/referenceattachment?view=graph-rest-1.0\\\"\u003ereferenceAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/schemaextension?view=graph-rest-1.0\\\"\u003eschemaExtension resource type (schema extensions)\u003c/a\u003e. Schema extensions allow you to define a schema to extend and add strongly typed custom data to a resource type. The custom data appears as a complex type on the extended resource. See the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eschema extension example\u003c/a\u003e to learn how to add custom data to groups.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eMicrosoft Graph API endpoints\u003c/h3\u003e\\n\u003cp\u003eSee the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide\\\"\u003eOffice 365 URLs and IP address ranges\u003c/a\u003e - This article contains most of the endpoints for Azure and M365, including Azure and Microsoft Graph.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0\\\"\u003eMicrosoft Graph REST API v1.0 reference\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-beta#call-the-v10-endpoint\\\"\u003eMicrosoft Graph beta endpoint reference\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eReports and logs\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Entra ID tracks user activity and creates reports that help you understand how your users access and use Microsoft Entra services. Use the Microsoft Graph API for Microsoft Entra ID to analyze the data in these reports and to create custom solutions tailored to your organization\u0027s specific needs. The availability of these activity reports is governed by the Microsoft Entra data retention policies.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eFor more information, see:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0\\\"\u003eActivity reports API overview\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-long-does-azure-ad-store-the-data\\\"\u003eData retention policies\u003c/a\u003e.\u003cbr\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cul\u003e\\n\u003cli\u003eWith Microsoft Graph, you can access Microsoft 365 usage reports resources to get information about how people in your business are using Microsoft 365 services. For example, you can identify who\u0027s using a service a lot and reaching quotas, or who may not need a Microsoft 365 license at all, see \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eWorking with Microsoft 365 usage reports in Microsoft Graph\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eExpose a web API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-expose-web-apis\\\"\u003eQuickStart: Configure an application to expose a web API\u003c/a\u003e. In this QuickStart, register a web API with the Microsoft identity platform and expose it to client apps by adding an example scope. By registering your web API and exposing it through scopes, you can provide permission-based access to its resources to authorized users and client apps that access your API.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eCommon issues and solutions\u003c/h2\u003e\u003ch3\u003eThe API I\u0027m calling doesn\u0027t work\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eTest Microsoft Graph APIs in your tenant or a demo tenant. Also, check out the sample queries in \u003ca href=\\\"https://developer.microsoft.com/graph/graph-explorer\\\"\u003eMicrosoft Graph Explorer\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eLearn how to configure the code for your daemon application that calls web APIs, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/scenario-daemon-app-configuration?tabs=dotnet\\\"\u003eDaemon app that calls web APIs - code configuration\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I check the status of service availability and connectivity?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eThe service availability and connectivity of the underlying services that can be accessed through Microsoft Graph can impact on the overall availability and performance of Microsoft Graph.\\n\u003cul\u003e\\n\u003cli\u003eFor Microsoft Entra service health, check the status of \u003cstrong\u003eSecurity + Identity\u003c/strong\u003e services listed in the \u003ca href=\\\"https://azure.microsoft.com/status/\\\"\u003eAzure status page\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eFor Office services that contribute to Microsoft Graph, check the status of services listed in the \u003ca href=\\\"https://portal.office.com/adminportal/home#/servicehealth\\\"\u003eOffice Service Health Dashboard\u003c/a\u003e. Microsoft Graph authorization errors can be a result of several issues, most of which generate a 401 or 403 error.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I find more information on errors and known issues?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/errors\\\"\u003eMicrosoft Graph error response information\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/known-issues\\\"\u003eKnown issues with Microsoft Graph\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003cdiv class=\\\"simplified-solution-web-results-container\\\"\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eAzure Docs\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/en-us/azure/programmable-connectivity/azure-programmable-connectivity-billing\\\" target=\\\"_blank\\\"\u003eConsolidated Billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003e...billing, enabling developers to receive a unified invoice from Azure for all their API plans, rather than managing separate bills from various operators. This streamlined approach not only reduces ...\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eCommunity\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/answers/questions/928000/\\\" target=\\\"_blank\\\"\u003eazure billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003eI was cancelled my subscription but still it is billing.\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\",\"provisioningState\":\"Succeeded\",\"appendix\":{}}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSimplifiedSolution+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "b0e41fbf-edd7-4a34-a0c7-21152f637f22" ], + "CommandName": [ "Get-AzSelfHelpSimplifiedSolution" ], + "FullCommandName": [ "Get-AzSelfHelpSimplifiedSolution_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "bed4db6f-297f-4e0b-ab3b-b7f146c4d6c2" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "bed4db6f-297f-4e0b-ab3b-b7f146c4d6c2" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204346Z:bed4db6f-297f-4e0b-ab3b-b7f146c4d6c2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E66119F150474933AF5F314A73C4FAFC Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:43:46Z" ], + "Date": [ "Fri, 05 Apr 2024 20:43:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/zmw3l2xp7o\",\"name\":\"zmw3l2xp7o\",\"type\":\"Microsoft.Help/simplifiedSolutions\",\"properties\":{\"title\":\"Catch-all: Microsoft Graph API issues\",\"content\":\"\u003ch2\u003eTroubleshoot issues with the Microsoft Graph API\u003c/h2\u003e\\n\u003cp\u003e\u003cstrong\u003eNotice:\u003c/strong\u003e Azure Active Directory (Azure AD) is being renamed to Microsoft Entra ID. No customer action is required. Capabilities, licensing, pricing, service level agreements, APIs, authentication and developer experiences are not impacted. \u003ca href=\\\"https://learn.microsoft.com/azure/active-directory/fundamentals/new-name\\\"\u003eLearn more\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eUse the following guidance to troubleshoot Microsoft Graph API issues, including issues related to authentication, authorization, and API. You\u0027ll also find information about the end of support for Azure AD Authentication Library (ADAL) and Azure AD Graph API.\u003c/p\u003e\\n\u003cp\u003eScan the following headings and select one or more that will help resolve your issue.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eEnd of support for Azure AD Graph API and Azure Active Directory Authentication Library\u003c/h2\u003e\u003ch3\u003eAzure Active Directory Graph API deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure AD Graph APIs will be retired by March 30, 2024.\u003c/em\u003e See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e. We want to make sure that all customers migrate off and discourage applications from taking production dependencies on Azure AD Graph. Investments in the new features and functionalities will be made only to \u003ca href=\\\"https://learn.microsoft.com/graph/overview\\\"\u003eMicrosoft Graph\u003c/a\u003e. Going forward, we\u0027ll continue to support Azure AD Graph with security-related fixes.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing migration from Azure AD Graph to Microsoft Graph. For more information, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003eMigrate Azure AD Graph apps to Microsoft Graph - Microsoft Graph | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eMicrosoft Entra ID and MSOnline PowerShell deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell cmdlets will be retired by March 30, 2024 See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e.\u003c/em\u003e The three modules will continue to work with minimal investment, apart from security updates.\u003c/p\u003e\\n\u003cp\u003eWe encourage you to continue migrating to The Microsoft Graph PowerShell SDK because that continues to be where all our current and future PowerShell investments are being made. We\u0027re also working on tools and documentation for migrating existing scripts and PowerShell processes that rely on the Azure AD Graph and MSOnline module to the Microsoft Graph PowerShell SDK.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0\\\"\u003eFind Microsoft Entra ID and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs\u003c/a\u003e and \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0\\\"\u003eMigrate from Azure AD PowerShell to the Microsoft Graph PowerShell SDK | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eAzure Active Directory Authentication Library retirement\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure Active Directory Authentication Library (ADAL) end-of-support is on June 30, 2023\u003c/em\u003e. While existing ADAL apps may continue to work, no support or security fixes will be provided past end-of-life. In addition, there are no planned ADAL releases prior to end-of-life for features, or planned support for new platform versions.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing the migration of your applications to Microsoft Authentication Library (MSAL). For more information about ADAL to MSAL migration, see \u003ca href=\\\"https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration\\\"\u003eMigrate to the Microsoft Authentication Library - Microsoft Entra | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454\\\"\u003eSeptember 2022 change announcements\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eVideos: Migrating from Azure AD Graph to Microsoft Graph\u003c/h3\u003e\\n\u003cp\u003eThe following videos explain more about migrating from Azure AD Graph to Microsoft Graph.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-video-group-container\\\"\\\"\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/iKK-F2PyoQU?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph to Microsoft Graph\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/oiXMv0xoH1s?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph and MSOL PowerShell to MS Graph PowerShell\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eTroubleshoot Microsoft Graph API issues\u003c/h2\u003e\u003cp\u003eUse the following troubleshooting guidance to resolve Microsoft Graph API issues.\u003c/p\u003e\\n\u003ch3\u003eAzure AD Graph migration\u003c/h3\u003e\\n\u003cp\u003eFor applications using Azure AD Graph, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003emigrate Azure AD Graph apps to Microsoft Graph\u003c/a\u003e.\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eStart with the \u003ca href=\\\"https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist\\\"\u003eapp migration planning checklist\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYour Azure app registration portal shows which applications use Azure AD Graph.\u003c/li\u003e\\n\u003cli\u003eReview your apps source code, and if applicable, contact independent software vendors (ISVs) or app providers. Microsoft support can provide a list of Azure AD Graph usage in your tenant.\u003c/li\u003e\\n\u003cli\u003eIf you\u0027re having issues, post a question on \u003ca href=\\\"https://learn.microsoft.com/en-us/answers/topics/azure-ad-graph-deprecation.html\\\"\u003eMicrosoft Q\u0026amp;A\u003c/a\u003e and tag it with \u003ccode\u003eazure-ad-graph-deprecation\u003c/code\u003e, or post your question on \u003ca href=\\\"https://stackoverflow.com/questions/ask\\\"\u003eStackOverflow\u003c/a\u003e with the \u003ccode\u003eazureadgraph-deprecation\u003c/code\u003e tag.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003cp\u003eReview the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-faq\\\"\u003eAzure AD Graph to Microsoft Graph migration frequently asked questions\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-registration-config-grant-permissions-how-to/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eConfigure how users consent to applications\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-delegated-and-app-perms/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eHow to recognize differences between delegated and application permissions\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eUpgrade from Microsoft Entra ID and MSOnline PowerShell to Microsoft Graph PowerShell\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#why-upgrade-to-microsoft-graph-powershell\\\"\u003eWhy upgrade to Microsoft Graph PowerShell?\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#upgrading-to-microsoft-graph-powershell\\\"\u003eSteps to follow when upgrading to MS Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#limitations\\\"\u003eLimitations\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eCmdlet mappings from Microsoft Entra ID and MSOnline PowerShell modules to MS Graph PowerShell module\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#azure-ad-to-microsoft-graph-powershell-by-category\\\"\u003eMicrosoft Entra ID to Microsoft Graph PowerShell by category\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#msonline-to-microsoft-graph-powershell\\\"\u003eMSOnline to Microsoft Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eAuthentication or authorization issues\u003c/h3\u003e\\n\u003cp\u003eSee the following resources to resolve authentication or authorization issues:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cp\u003eAuthorization errors can occur for several reasons, most of which generate a 403 error, with a few exceptions. For example, the following scenarios can lead to authorization errors:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-scenarios\\\"\u003eIncorrect access token acquisition flows\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-scopes\\\"\u003ePoorly configured permission scopes\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview#understanding-user-and-admin-consent\\\"\u003eLack of consent\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent\\\"\u003eLack of permissions\u003c/a\u003e \u003cbr\u003e\\nFor more information, see \u003ca href=\\\"https://docs.microsoft.com/graph/resolve-auth-errors\\\"\u003eResolve Microsoft Graph authorization errors\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to implement the OAuth 2.0 authorization code grant flow. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-user\\\"\u003eGet access on behalf of a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to program directly against the code grant (PKCE) flow in your application using any language, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow\\\"\u003eMicrosoft identity platform and OAuth 2.0 authorization code flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eConfigure a service and use the OAuth client credentials grant flow to get an access token. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-service\\\"\u003eGet access without a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the client credentials flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow\\\"\u003eMicrosoft identity platform and the OAuth 2.0 client credentials flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the resource owner password credential (ROPC) flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc\\\"\u003eMicrosoft identity platform and OAuth 2.0 resource owner password credentials\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eThe Microsoft identity platform only supports ROPC for Microsoft Entra tenants, not personal accounts. This means that you must use a tenant-specific endpoint, for example, \u0026quot;//login.microsoftonline.com/{TenantId_or_Name}\u0026quot; or the \u003cem\u003eorganization\u0027s\u003c/em\u003e endpoint.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003ePersonal accounts that are invited to a Microsoft Entra tenant can\u0027t use ROPC.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAccounts that don\u0027t have passwords can\u0027t sign in through ROPC. In this case, we recommend using a different flow for your app.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eIf users need to use \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/authentication/concept-mfa-howitworks\\\"\u003emultifactor authentication (MFA)\u003c/a\u003e to sign in to the application, they\u0027ll be blocked instead.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eROPC is not supported in \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/whatis-fed\\\"\u003ehybrid identity federation\u003c/a\u003e scenarios. For example, Microsoft Entra ID and Active Directory Federation Services (AD FS) previously authenticated on-premises accounts. If users are full-page redirected to an on-premises identity provider, Microsoft Entra ID is not able to test the username and password against that identity provider. \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-pta\\\"\u003ePass-through authentication\u003c/a\u003e is supported with ROPC, however.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAn exception to a hybrid identity federation scenario would be the following: home realm discovery (HRD) policy with \u003ccode\u003eAllowCloudPasswordValidation\u003c/code\u003e set to \u003ccode\u003eTRUE\u003c/code\u003e will enable ROPC flow to work for federated users when the on-premises password is synced to the cloud. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/manage-apps/configure-authentication-for-federated-users-portal#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications\\\"\u003eEnable direct ROPC authentication of federated users for legacy applications\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eQuery data from API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Graph supports optional query parameters you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints. See \u003ca href=\\\"https://docs.microsoft.com/graph/query-parameters#odata-system-query-options\\\"\u003eUse query parameters to customize responses\u003c/a\u003e for more information.\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta\\\"\u003euser resource type\u003c/a\u003e. This represents a Microsoft Entra user account and inherits from directoryObject. For performance reasons, the \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-post-users?view=graph-rest-beta\\\"\u003ecreate\u003c/a\u003e, \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-get?view=graph-rest-beta\\\"\u003eget\u003c/a\u003e, and \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-list?view=graph-rest-beta\\\"\u003elist\u003c/a\u003e operations return only a subset of more commonly used properties by default. These default properties are noted in the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta#properties\\\"\u003eproperties\u003c/a\u003e section. To get any of the properties that are not returned by default, specify them in a \u003ccode\u003e$select\u003c/code\u003e OData query option.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/attachment?view=graph-rest-1.0\\\"\u003eattachment resource type\u003c/a\u003e. You can add related content to a user event, message, or post in the form of an attachment. Attachment is the base resource for the following derived types of attachments:\\n\u003cul\u003e\\n\u003cli\u003eA file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/fileattachment?view=graph-rest-1.0\\\"\u003efileAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eAn item (contact, event or message, represented by an \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/itemattachment?view=graph-rest-1.0\\\"\u003eitemAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eA link to a file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/referenceattachment?view=graph-rest-1.0\\\"\u003ereferenceAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/schemaextension?view=graph-rest-1.0\\\"\u003eschemaExtension resource type (schema extensions)\u003c/a\u003e. Schema extensions allow you to define a schema to extend and add strongly typed custom data to a resource type. The custom data appears as a complex type on the extended resource. See the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eschema extension example\u003c/a\u003e to learn how to add custom data to groups.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eMicrosoft Graph API endpoints\u003c/h3\u003e\\n\u003cp\u003eSee the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide\\\"\u003eOffice 365 URLs and IP address ranges\u003c/a\u003e - This article contains most of the endpoints for Azure and M365, including Azure and Microsoft Graph.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0\\\"\u003eMicrosoft Graph REST API v1.0 reference\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-beta#call-the-v10-endpoint\\\"\u003eMicrosoft Graph beta endpoint reference\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eReports and logs\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Entra ID tracks user activity and creates reports that help you understand how your users access and use Microsoft Entra services. Use the Microsoft Graph API for Microsoft Entra ID to analyze the data in these reports and to create custom solutions tailored to your organization\u0027s specific needs. The availability of these activity reports is governed by the Microsoft Entra data retention policies.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eFor more information, see:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0\\\"\u003eActivity reports API overview\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-long-does-azure-ad-store-the-data\\\"\u003eData retention policies\u003c/a\u003e.\u003cbr\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cul\u003e\\n\u003cli\u003eWith Microsoft Graph, you can access Microsoft 365 usage reports resources to get information about how people in your business are using Microsoft 365 services. For example, you can identify who\u0027s using a service a lot and reaching quotas, or who may not need a Microsoft 365 license at all, see \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eWorking with Microsoft 365 usage reports in Microsoft Graph\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eExpose a web API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-expose-web-apis\\\"\u003eQuickStart: Configure an application to expose a web API\u003c/a\u003e. In this QuickStart, register a web API with the Microsoft identity platform and expose it to client apps by adding an example scope. By registering your web API and exposing it through scopes, you can provide permission-based access to its resources to authorized users and client apps that access your API.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eCommon issues and solutions\u003c/h2\u003e\u003ch3\u003eThe API I\u0027m calling doesn\u0027t work\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eTest Microsoft Graph APIs in your tenant or a demo tenant. Also, check out the sample queries in \u003ca href=\\\"https://developer.microsoft.com/graph/graph-explorer\\\"\u003eMicrosoft Graph Explorer\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eLearn how to configure the code for your daemon application that calls web APIs, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/scenario-daemon-app-configuration?tabs=dotnet\\\"\u003eDaemon app that calls web APIs - code configuration\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I check the status of service availability and connectivity?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eThe service availability and connectivity of the underlying services that can be accessed through Microsoft Graph can impact on the overall availability and performance of Microsoft Graph.\\n\u003cul\u003e\\n\u003cli\u003eFor Microsoft Entra service health, check the status of \u003cstrong\u003eSecurity + Identity\u003c/strong\u003e services listed in the \u003ca href=\\\"https://azure.microsoft.com/status/\\\"\u003eAzure status page\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eFor Office services that contribute to Microsoft Graph, check the status of services listed in the \u003ca href=\\\"https://portal.office.com/adminportal/home#/servicehealth\\\"\u003eOffice Service Health Dashboard\u003c/a\u003e. Microsoft Graph authorization errors can be a result of several issues, most of which generate a 401 or 403 error.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I find more information on errors and known issues?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/errors\\\"\u003eMicrosoft Graph error response information\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/known-issues\\\"\u003eKnown issues with Microsoft Graph\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003cdiv class=\\\"simplified-solution-web-results-container\\\"\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eAzure Docs\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/en-us/azure/programmable-connectivity/azure-programmable-connectivity-billing\\\" target=\\\"_blank\\\"\u003eConsolidated Billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003e...billing, enabling developers to receive a unified invoice from Azure for all their API plans, rather than managing separate bills from various operators. This streamlined approach not only reduces ...\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eCommunity\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/answers/questions/928000/\\\" target=\\\"_blank\\\"\u003eazure billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003eI was cancelled my subscription but still it is billing.\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\",\"provisioningState\":\"Succeeded\",\"appendix\":{}}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Tests.ps1 new file mode 100644 index 000000000000..9a65dfe374d2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSimplifiedSolution.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpSimplifiedSolution')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSelfHelpSimplifiedSolution.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSelfHelpSimplifiedSolution' -Tag 'LiveOnly' { + It 'Get' { + { + $resourceName = RandomString -allChars $false -len 10 + $solutionId = "9004345-7759" + $parameters = [ordered]@{ + + "SearchText" = "Billing" + } + New-AzSelfHelpSimplifiedSolution -Scope $env.scope -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters + Get-AzSelfHelpSimplifiedSolution -Scope $env.scope -SResourceName $resourceName + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Recording.json new file mode 100644 index 000000000000..078062305ca2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Recording.json @@ -0,0 +1,174 @@ +{ + "Get-AzSelfHelpSolution+[NoContext]+Get+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"triggerCriteria\": [\n {\n \"name\": \"SolutionId\",\n \"value\": \"apollo-cognitve-search-custom-skill\"\n }\n ],\n \"parameters\": {\n \"SearchText\": \"Can not Search\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "221" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/ns7xw3afib/operationResults/c1471cea-17ec-4745-a364-0304b7ed7dda?api-version=2024-03-01-preview\u0026t=638479466409777162\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=qBdI0Lg-dsrvY0BUYapsUSEZiDTM4n-kDa433fsSnCGAgI7nSQszrLee3gCKW91jH3OC_QZDMfDCwhllrvFQaKVPffg1HnAANhbossRpP8CWGUFxQ9FJzyrFSkTy9V7JeH_kpt_eiDdwYUlV2JuFA17fX8GASIiXf3u0L7z0nQz_J1W7w9XgybED5_BiEITg1ZoMc3FrxHwsdByMJ8hrHJGvCheF5yF_3owBQUjap3_uuNPpzih2mv_dd7QdWmAzdjPl91-ID84bDwPYJ58SBiw68SnlIqIAOQhQH2CXOlrEt-RA4pj__yrZgf4aZ9wC5nV3wfjWflD13-CdTI7GPg\u0026h=PUkf-Ur8dQ31FSlv81wFep3Our1QUn28X8EIxcVGHRQ" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/ns7xw3afib/operationResults/c1471cea-17ec-4745-a364-0304b7ed7dda?api-version=2024-03-01-preview\u0026t=638479466409777162\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=qBdI0Lg-dsrvY0BUYapsUSEZiDTM4n-kDa433fsSnCGAgI7nSQszrLee3gCKW91jH3OC_QZDMfDCwhllrvFQaKVPffg1HnAANhbossRpP8CWGUFxQ9FJzyrFSkTy9V7JeH_kpt_eiDdwYUlV2JuFA17fX8GASIiXf3u0L7z0nQz_J1W7w9XgybED5_BiEITg1ZoMc3FrxHwsdByMJ8hrHJGvCheF5yF_3owBQUjap3_uuNPpzih2mv_dd7QdWmAzdjPl91-ID84bDwPYJ58SBiw68SnlIqIAOQhQH2CXOlrEt-RA4pj__yrZgf4aZ9wC5nV3wfjWflD13-CdTI7GPg\u0026h=PUkf-Ur8dQ31FSlv81wFep3Our1QUn28X8EIxcVGHRQ" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3dd4e17f-247f-49ac-bf50-803b2d236022" ], + "x-ms-correlation-request-id": [ "3dd4e17f-247f-49ac-bf50-803b2d236022" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204400Z:3dd4e17f-247f-49ac-bf50-803b2d236022" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2198A49ABE374B2ABB034C683F0B0B5F Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:44:00Z" ], + "Date": [ "Fri, 05 Apr 2024 20:44:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3414" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib\",\"name\":\"ns7xw3afib\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"GitHub_625773453\",\"content\":\"...accurate ? \u003e Search Administrators can delegate the Search Administrators and Search Editor roles to users... ##### You can\u0027t delegate your Search Admin role to other users if I\u0027m not wrong...\",\"title\":\" Search Admin role delegation\",\"confidence\":\"High\",\"source\":\"GitHub\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://github.com/MicrosoftDocs/azure-docs/issues/55782\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSolution+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/ns7xw3afib/operationResults/c1471cea-17ec-4745-a364-0304b7ed7dda?api-version=2024-03-01-preview\u0026t=638479466409777162\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=qBdI0Lg-dsrvY0BUYapsUSEZiDTM4n-kDa433fsSnCGAgI7nSQszrLee3gCKW91jH3OC_QZDMfDCwhllrvFQaKVPffg1HnAANhbossRpP8CWGUFxQ9FJzyrFSkTy9V7JeH_kpt_eiDdwYUlV2JuFA17fX8GASIiXf3u0L7z0nQz_J1W7w9XgybED5_BiEITg1ZoMc3FrxHwsdByMJ8hrHJGvCheF5yF_3owBQUjap3_uuNPpzih2mv_dd7QdWmAzdjPl91-ID84bDwPYJ58SBiw68SnlIqIAOQhQH2CXOlrEt-RA4pj__yrZgf4aZ9wC5nV3wfjWflD13-CdTI7GPg\u0026h=PUkf-Ur8dQ31FSlv81wFep3Our1QUn28X8EIxcVGHRQ+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/ns7xw3afib/operationResults/c1471cea-17ec-4745-a364-0304b7ed7dda?api-version=2024-03-01-preview\u0026t=638479466409777162\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=qBdI0Lg-dsrvY0BUYapsUSEZiDTM4n-kDa433fsSnCGAgI7nSQszrLee3gCKW91jH3OC_QZDMfDCwhllrvFQaKVPffg1HnAANhbossRpP8CWGUFxQ9FJzyrFSkTy9V7JeH_kpt_eiDdwYUlV2JuFA17fX8GASIiXf3u0L7z0nQz_J1W7w9XgybED5_BiEITg1ZoMc3FrxHwsdByMJ8hrHJGvCheF5yF_3owBQUjap3_uuNPpzih2mv_dd7QdWmAzdjPl91-ID84bDwPYJ58SBiw68SnlIqIAOQhQH2CXOlrEt-RA4pj__yrZgf4aZ9wC5nV3wfjWflD13-CdTI7GPg\u0026h=PUkf-Ur8dQ31FSlv81wFep3Our1QUn28X8EIxcVGHRQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "395ec426-dadc-4d65-ad41-140dbc09c4f8" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "d9939d4e-71ca-42ee-a45b-03c912d4b5a4" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "d9939d4e-71ca-42ee-a45b-03c912d4b5a4" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204431Z:d9939d4e-71ca-42ee-a45b-03c912d4b5a4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D0B565F160B7438BB6A859EA9382ED34 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:44:31Z" ], + "Date": [ "Fri, 05 Apr 2024 20:44:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "227" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/ns7xw3afib/operationResults/c1471cea-17ec-4745-a364-0304b7ed7dda\",\"name\":\"c1471cea-17ec-4745-a364-0304b7ed7dda\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSolution+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "395ec426-dadc-4d65-ad41-140dbc09c4f8" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "c56a8af1-a9c7-4dd3-9ef5-d1148053dfb6" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "c56a8af1-a9c7-4dd3-9ef5-d1148053dfb6" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204431Z:c56a8af1-a9c7-4dd3-9ef5-d1148053dfb6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D6B1F78C2435454A8117C2AFC586A2F0 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:44:31Z" ], + "Date": [ "Fri, 05 Apr 2024 20:44:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3414" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib\",\"name\":\"ns7xw3afib\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"GitHub_625773453\",\"content\":\"...accurate ? \u003e Search Administrators can delegate the Search Administrators and Search Editor roles to users... ##### You can\u0027t delegate your Search Admin role to other users if I\u0027m not wrong...\",\"title\":\" Search Admin role delegation\",\"confidence\":\"High\",\"source\":\"GitHub\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://github.com/MicrosoftDocs/azure-docs/issues/55782\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpSolution+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "8df68dbb-5c62-4a82-b457-871fa4de0ef6" ], + "CommandName": [ "Get-AzSelfHelpSolution" ], + "FullCommandName": [ "Get-AzSelfHelpSolution_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "361d766a-c253-4e1f-bce6-1d540f1c6ad9" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "361d766a-c253-4e1f-bce6-1d540f1c6ad9" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204432Z:361d766a-c253-4e1f-bce6-1d540f1c6ad9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C3F3E5BAF1B944C08039340B98C5A8D4 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:44:31Z" ], + "Date": [ "Fri, 05 Apr 2024 20:44:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3414" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/ns7xw3afib\",\"name\":\"ns7xw3afib\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"GitHub_625773453\",\"content\":\"...accurate ? \u003e Search Administrators can delegate the Search Administrators and Search Editor roles to users... ##### You can\u0027t delegate your Search Admin role to other users if I\u0027m not wrong...\",\"title\":\" Search Admin role delegation\",\"confidence\":\"High\",\"source\":\"GitHub\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://github.com/MicrosoftDocs/azure-docs/issues/55782\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Tests.ps1 index d0c30a8589b9..3f2d89c66e01 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolution.Tests.ps1 @@ -14,17 +14,16 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpSolution')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzSelfHelpSolution' -Tag 'LiveOnly' { +Describe 'Get-AzSelfHelpSolution' -Tag 'LiveOnly'{ It 'Get' { $resourceName = RandomString -allChars $false -len 10 $criteria = [ordered]@{ "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" + "value" = "apollo-cognitve-search-custom-skill" } $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } New-AzSelfHelpSolution -Scope $env.scope -ResourceName $resourceName -TriggerCriterion $criteria -Parameter $parameters diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Recording.json new file mode 100644 index 000000000000..ae5a831035a2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Recording.json @@ -0,0 +1,46 @@ +{ + "Get-AzSelfHelpSolutionSelfHelp+[NoContext]+Get+$GET+https://management.azure.com/providers/Microsoft.Help/selfHelp/apollo-48996ff7-002f-47c1-85b2-df138843d5d5?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/providers/Microsoft.Help/selfHelp/apollo-48996ff7-002f-47c1-85b2-df138843d5d5?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "d260ea5e-d9db-4157-8c77-89fa73ac7f99" ], + "CommandName": [ "Get-AzSelfHelpSolutionSelfHelp" ], + "FullCommandName": [ "Get-AzSelfHelpSolutionSelfHelp_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "49ba1612-83b4-4d26-8918-07e22bc03f05" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "49ba1612-83b4-4d26-8918-07e22bc03f05" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204446Z:49ba1612-83b4-4d26-8918-07e22bc03f05" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 95EC19717038493692F401AEEA955637 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:44:46Z" ], + "Date": [ "Fri, 05 Apr 2024 20:44:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2212" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/providers/Microsoft.Help/selfHelp/apollo-48996ff7-002f-47c1-85b2-df138843d5d5\",\"name\":\"apollo-48996ff7-002f-47c1-85b2-df138843d5d5\",\"type\":\"Microsoft.Help/selfHelp\",\"properties\":{\"title\":\"Durable Functions/Creation\",\"content\":\"\u003ch2\u003eResolve issues with creating Durable Functions\u003c/h2\u003e\\n\u003cp\u003eDurable Functions is an extension of Azure Functions that lets you write stateful functions in a serverless environment. The extension manages state, checkpoints, and restarts for you.\u003c/p\u003e\\n\u003ch3\u003eRecommended steps\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eIf you\u0027re using the \u003ca href=\\\"https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-storage-providers#mssql\\\"\u003eMicrosoft SQL Server storage provider\u003c/a\u003e, multitenancy mode is enabled by default, in which case the TaskHub name will be the SQL login username (for example, \u003cstrong\u003edbo\u003c/strong\u003e). If you want to disable multitenancy mode, run the following T-SQL command:\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cpre class=\\\"ext-code\\\"\u003e\u003ccode\u003e EXECUTE dt.SetGlobalSetting @Name=\u0027TaskHubMode\u0027, @Value=0\\n\u003c/code\u003e\u003c/pre\u003e\\n\u003cp\u003eWhen multitenancy mode is disabled, the \u003ccode\u003eTaskHub\u003c/code\u003e name is the one that you specify in the \u003ca href=\\\"https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-task-hubs?tabs=csharp#task-hub-names\\\"\u003ehost.json or Function binding\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://microsoft.github.io/durabletask-mssql/#/multitenancy?id=enabling-multitenancy\\\"\u003eMultitenancy\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-create-first-csharp\\\"\u003eCreate your first durable function in C#\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/azure-functions/durable/quickstart-js-vscode\\\"\u003eCreate your first durable function in JavaScript\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-storage-providers\\\"\u003eDurable Functions storage providers\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--ecc4cc50-08a2-493c-98d8-4d55e420f0a7--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"replacementKey\":\"\u003c!--ecc4cc50-08a2-493c-98d8-4d55e420f0a7--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-48996ff7-002f-47c1-85b2-df138843d5d5\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Tests.ps1 new file mode 100644 index 000000000000..16cd1a1fd227 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpSolutionSelfHelp.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpSolutionSelfHelp')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSelfHelpSolutionSelfHelp.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSelfHelpSolutionSelfHelp' -Tag 'LiveOnly'{ + It 'Get' { + { + Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Recording.json new file mode 100644 index 000000000000..8a4a15b0eed9 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Recording.json @@ -0,0 +1,84 @@ +{ + "Get-AzSelfHelpTroubleshooter+[NoContext]+Get+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\n \"parameters\": {\n \"ResourceUri\": \"/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "184" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "0e944151-885c-49ba-9caf-3372747e341e" ], + "x-ms-correlation-request-id": [ "0e944151-885c-49ba-9caf-3372747e341e" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204503Z:0e944151-885c-49ba-9caf-3372747e341e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D0CAA4DC045240038C1F37889C8ADBC4 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:01Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921\",\"name\":\"094e82a0-65b0-47b0-96c6-62aef1251921\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"72b61ee7-132e-4cb1-8ee7-e279bcf33189\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + }, + "Get-AzSelfHelpTroubleshooter+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "0fedcb6d-1677-49f3-b987-67f707e53351" ], + "CommandName": [ "Get-AzSelfHelpTroubleshooter" ], + "FullCommandName": [ "Get-AzSelfHelpTroubleshooter_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "f374bb22-5079-4931-a98d-6e439d9d7497" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "f374bb22-5079-4931-a98d-6e439d9d7497" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204504Z:f374bb22-5079-4931-a98d-6e439d9d7497" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DF3B86FA40A545BA873DFB5131C35E9A Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:03Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "887" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/troubleshooters/094e82a0-65b0-47b0-96c6-62aef1251921\",\"name\":\"094e82a0-65b0-47b0-96c6-62aef1251921\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"72b61ee7-132e-4cb1-8ee7-e279bcf33189\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Tests.ps1 index 9a0c01952bd0..fe661fa7329b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Get-AzSelfHelpTroubleshooter.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSelfHelpTroubleshooter' . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzSelfHelpTroubleshooter' -Tag 'LiveOnly' { +Describe 'Get-AzSelfHelpTroubleshooter' -Tag 'LiveOnly'{ It 'Get' { { $resourceName = New-Guid $parameters = [ordered]@{ diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Recording.json index 1b3963bb06bd..12a0b2a5aeab 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Recording.json +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Recording.json @@ -1,15 +1,15 @@ { - "Invoke-AzSelfHelpCheckNameAvailability+[NoContext]+PostExpanded+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/checkNameAvailability?api-version=2023-09-01-preview+1": { + "Invoke-AzSelfHelpCheckNameAvailability+[NoContext]+Post+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/checkNameAvailability?api-version=2024-03-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/checkNameAvailability?api-version=2023-09-01-preview", - "Content": "{\r\n \"name\": \"helloworld\",\r\n \"type\": \"solutions\"\r\n}", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/checkNameAvailability?api-version=2024-03-01-preview", + "Content": "{\n \"name\": \"helloworld\",\n \"type\": \"solutions\"\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "52" ] + "Content-Length": [ "49" ] } }, "Response": { @@ -18,16 +18,16 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "3b9e391a-0429-43a9-a454-e8d9ea6b082c" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-request-id": [ "f9632039-7a85-4375-99c1-677c58cc06c9" ], - "x-ms-correlation-request-id": [ "f9632039-7a85-4375-99c1-677c58cc06c9" ], - "x-ms-routing-request-id": [ "EASTUS:20230929T174139Z:f9632039-7a85-4375-99c1-677c58cc06c9" ], + "x-ms-correlation-request-id": [ "3b9e391a-0429-43a9-a454-e8d9ea6b082c" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204520Z:3b9e391a-0429-43a9-a454-e8d9ea6b082c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DBFE788829914246B3D4C7EDC79F4D82 Ref B: BN1AA2051014029 Ref C: 2023-09-29T17:41:39Z" ], - "Date": [ "Fri, 29 Sep 2023 17:41:38 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 193FA20840844F519657818881FC92D6 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:20Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:19 GMT" ] }, "ContentHeaders": { "Content-Length": [ "22" ], diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Tests.ps1 index 1bf484bb83de..cab8452adccd 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpCheckNameAvailability.Tests.ps1 @@ -14,8 +14,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSelfHelpCheckNameAva . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Invoke-AzSelfHelpCheckNameAvailability' { - It 'PostExpanded' { +Describe 'Invoke-AzSelfHelpCheckNameAvailability' -Tag 'LiveOnly'{ + It 'Post' { + $resourceName = RandomString -allChars $true -len 10 $scope = "/subscriptions/$($env.SubscriptionId)" $CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ "name" ="helloworld" diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Recording.json new file mode 100644 index 000000000000..25bceb4179fe --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Recording.json @@ -0,0 +1,120 @@ +{ + "Invoke-AzSelfHelpContinueTroubleshooter+[NoContext]+ContinueExpanded+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\n \"parameters\": {\n \"ResourceUri\": \"/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "184" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "521840b5-7af2-419b-95f3-ba41bac7e103" ], + "x-ms-correlation-request-id": [ "521840b5-7af2-419b-95f3-ba41bac7e103" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204537Z:521840b5-7af2-419b-95f3-ba41bac7e103" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 86040DF188B2476B9D6278CC6FCBD64C Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:37Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb\",\"name\":\"1ca63fc8-3c04-4009-8a70-87dc5bc24deb\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"52401b7d-3bb7-4d0f-91f5-f9b81294124a\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + }, + "Invoke-AzSelfHelpContinueTroubleshooter+[NoContext]+ContinueExpanded+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "3cfdb099-b103-4dbe-919f-dc4dac62036e" ], + "CommandName": [ "Get-AzSelfHelpTroubleshooter" ], + "FullCommandName": [ "Get-AzSelfHelpTroubleshooter_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "fa2df65c-7920-4b82-baed-c1e249985ea4" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "fa2df65c-7920-4b82-baed-c1e249985ea4" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204538Z:fa2df65c-7920-4b82-baed-c1e249985ea4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ECD9B11EC58B4A18B1B8006712B9DE00 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:37Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb\",\"name\":\"1ca63fc8-3c04-4009-8a70-87dc5bc24deb\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"52401b7d-3bb7-4d0f-91f5-f9b81294124a\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + }, + "Invoke-AzSelfHelpContinueTroubleshooter+[NoContext]+ContinueExpanded+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb/continue?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/1ca63fc8-3c04-4009-8a70-87dc5bc24deb/continue?api-version=2024-03-01-preview", + "Content": "{\n \"stepId\": \"52401b7d-3bb7-4d0f-91f5-f9b81294124a\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "5545cc59-995c-4022-bf06-36fe9faf8b89" ], + "x-ms-correlation-request-id": [ "5545cc59-995c-4022-bf06-36fe9faf8b89" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204539Z:5545cc59-995c-4022-bf06-36fe9faf8b89" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B462EE154A1F4BC797240F5EE7409B02 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:38Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:38 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Tests.ps1 index d2b14f5272fe..b18bb9f99a4c 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpContinueTroubleshooter.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSelfHelpContinueTrou . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Invoke-AzSelfHelpContinueTroubleshooter' -Tag 'LiveOnly' { +Describe 'Invoke-AzSelfHelpContinueTroubleshooter' -Tag 'LiveOnly'{ It 'ContinueExpanded' { { $resourceName = New-Guid $parameters = [ordered]@{ diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Recording.json new file mode 100644 index 000000000000..0b1b6409731d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Recording.json @@ -0,0 +1,41 @@ +{ + "Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope+[NoContext]+PostExpanded+$POST+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/discoverSolutions?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/discoverSolutions?api-version=2024-03-01-preview", + "Content": "{\n \"issueSummary\": \"Billing Issues\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "38" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "070af9ab-6964-4cf0-a3d8-99aa84e98143" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "070af9ab-6964-4cf0-a3d8-99aa84e98143" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204555Z:070af9ab-6964-4cf0-a3d8-99aa84e98143" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3608B16DBA924CABB22CA86498D08401 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:45:53Z" ], + "Date": [ "Fri, 05 Apr 2024 20:45:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Tests.ps1 new file mode 100644 index 000000000000..5b5f3287b7b2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope' -Tag 'LiveOnly'{ + It 'PostExpanded' { + { + Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId $env.SubscriptionId -IssueSummary "Billing Issues" + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Recording.json new file mode 100644 index 000000000000..dda7611256d3 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Recording.json @@ -0,0 +1,41 @@ +{ + "Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope+[NoContext]+PostExpanded+$POST+https://management.azure.com/providers/Microsoft.Help/discoverSolutions?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/providers/Microsoft.Help/discoverSolutions?api-version=2024-03-01-preview", + "Content": "{\n \"issueSummary\": \"Billing Issues\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "38" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "a98dd041-ba25-4734-bf47-98eeeb418b99" ], + "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "a98dd041-ba25-4734-bf47-98eeeb418b99" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204610Z:a98dd041-ba25-4734-bf47-98eeeb418b99" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 090149E5DE854A96B8076234E4BFA4D5 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:46:09Z" ], + "Date": [ "Fri, 05 Apr 2024 20:46:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Tests.ps1 new file mode 100644 index 000000000000..a00516de918a --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope' -Tag 'LiveOnly'{ + It 'PostExpanded' { + { + Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Recording.json new file mode 100644 index 000000000000..83e3f97cc187 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Recording.json @@ -0,0 +1,38 @@ +{ + "Invoke-AzSelfHelpWarmSolutionUp+[NoContext]+WarmExpanded+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/mig5lps1nd/warmup?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/mig5lps1nd/warmup?api-version=2024-03-01-preview", + "Content": "{\n \"parameters\": {\n \"ProductId\": \"13491\"\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "50" ] + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "d6fd6241-3468-40ff-8121-968d773e3767" ], + "x-ms-correlation-request-id": [ "d6fd6241-3468-40ff-8121-968d773e3767" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204626Z:d6fd6241-3468-40ff-8121-968d773e3767" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D7D8B1AF09F44E5AA5973A61E4FDDA6A Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:46:24Z" ], + "Date": [ "Fri, 05 Apr 2024 20:46:25 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Tests.ps1 new file mode 100644 index 000000000000..b2f3fd952178 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Invoke-AzSelfHelpWarmSolutionUp.Tests.ps1 @@ -0,0 +1,27 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSelfHelpWarmSolutionUp')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSelfHelpWarmSolutionUp.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSelfHelpWarmSolutionUp' -Tag 'LiveOnly'{ + It 'WarmExpanded' { + { + $resourceName = RandomString -allChars $false -len 10 + $parameters = [ordered]@{ + "ProductId" = "13491" + } + Invoke-AzSelfHelpWarmSolutionUp -Scope $env.scope -SolutionResourceName $resourceName -Parameter $parameters + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Recording.json new file mode 100644 index 000000000000..93550d634c8e --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Recording.json @@ -0,0 +1,130 @@ +{ + "New-AzSelfHelpDiagnostic+[NoContext]+CreateExpanded+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"insights\": [\n {\n \"solutionId\": \"Demo2InsightV2\"\n }\n ]\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "104" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/yku6n4wiej/operationResults/0b4e0071-7115-4d30-b75e-874f9163e87f?api-version=2024-03-01-preview\u0026t=638479468022616431\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=CBb_6a0dy8x2Riy2CmY-K-kmh6a8MWhRthvukNkOivKH8xqvSqwk_e2QU3IN1jdYSJoYHlt1vufTkfE5q5uWRhjzcYy777_5PWHfGXDPvG6osfzROfAIpFR5rMoJGp69sR3uGIEGRhdtOueHtwcsuIegtU3sI2v6S8wzObR2GlknA1dWLlJcc5m7YxAZXjfCKnMwu9k4g3NrpmZtOA5YMbExoLcGZ4jYgeIjlwVndykI10BbAR7XQPm0TxYYmnLXGl0tE4beVEcziBRcj6mDR0w1sRv8tePbZ-nCHaOy8erJkt6ooRsjSGJz_GLVwtlQEzFEQbAo3iqkdbVWZjxUnA\u0026h=Lx0vzcaOcxNdl9S3LbiCm2977QtEHyC8j2CZWVXXQXI" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "74" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/yku6n4wiej/operationResults/0b4e0071-7115-4d30-b75e-874f9163e87f?api-version=2024-03-01-preview\u0026t=638479468022460218\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=lE6ugIzuhm4EcZ62LnMyrFhXnYhNrnxfO_DEfHElvJd45KA5vwLMYT3Pl9y_Ea3ur18WzRUiMSn0PiiNOsqXOLpFrpzIqaPJzvL7x-lCbg2npwM9ht_jCxxAgOCvkIlPATuWCjSk720-Q4x3BjfZA-TBrTNquBciwRBCNNxMqekeJbM1gDt7WyHdKgp6fkm2zu8qCEFBQx-6qxaf4ISPOO-IBTk5zzkOTeIinUT3LeAdussQJiDz_yVAAdOhLAjeMA8QK2xzY58T5ftR3YChwIvySKWix5QU6ZMtO0B0qtJBH-Dv5hJBeo26xtnPHNz5ZxrHQMmOatoeIT_1oDQumw\u0026h=DFXFbWCR-mA_gO01byF_HInJry4UhEV6INHialLQqWM" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ec48d8a4-5219-4927-811f-ba305c71c358" ], + "x-ms-correlation-request-id": [ "ec48d8a4-5219-4927-811f-ba305c71c358" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204642Z:ec48d8a4-5219-4927-811f-ba305c71c358" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E78AAE4A3F2447B39407458B914FCD29 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:46:41Z" ], + "Date": [ "Fri, 05 Apr 2024 20:46:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "346" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej\",\"name\":\"yku6n4wiej\",\"type\":\"Microsoft.Help/Diagnostics\",\"properties\":{\"provisioningState\":\"Running\",\"acceptedAt\":\"2024-04-05T20:46:42.1848827Z\"}}", + "isContentBase64": false + } + }, + "New-AzSelfHelpDiagnostic+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/yku6n4wiej/operationResults/0b4e0071-7115-4d30-b75e-874f9163e87f?api-version=2024-03-01-preview\u0026t=638479468022460218\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=lE6ugIzuhm4EcZ62LnMyrFhXnYhNrnxfO_DEfHElvJd45KA5vwLMYT3Pl9y_Ea3ur18WzRUiMSn0PiiNOsqXOLpFrpzIqaPJzvL7x-lCbg2npwM9ht_jCxxAgOCvkIlPATuWCjSk720-Q4x3BjfZA-TBrTNquBciwRBCNNxMqekeJbM1gDt7WyHdKgp6fkm2zu8qCEFBQx-6qxaf4ISPOO-IBTk5zzkOTeIinUT3LeAdussQJiDz_yVAAdOhLAjeMA8QK2xzY58T5ftR3YChwIvySKWix5QU6ZMtO0B0qtJBH-Dv5hJBeo26xtnPHNz5ZxrHQMmOatoeIT_1oDQumw\u0026h=DFXFbWCR-mA_gO01byF_HInJry4UhEV6INHialLQqWM+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/yku6n4wiej/operationResults/0b4e0071-7115-4d30-b75e-874f9163e87f?api-version=2024-03-01-preview\u0026t=638479468022460218\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=lE6ugIzuhm4EcZ62LnMyrFhXnYhNrnxfO_DEfHElvJd45KA5vwLMYT3Pl9y_Ea3ur18WzRUiMSn0PiiNOsqXOLpFrpzIqaPJzvL7x-lCbg2npwM9ht_jCxxAgOCvkIlPATuWCjSk720-Q4x3BjfZA-TBrTNquBciwRBCNNxMqekeJbM1gDt7WyHdKgp6fkm2zu8qCEFBQx-6qxaf4ISPOO-IBTk5zzkOTeIinUT3LeAdussQJiDz_yVAAdOhLAjeMA8QK2xzY58T5ftR3YChwIvySKWix5QU6ZMtO0B0qtJBH-Dv5hJBeo26xtnPHNz5ZxrHQMmOatoeIT_1oDQumw\u0026h=DFXFbWCR-mA_gO01byF_HInJry4UhEV6INHialLQqWM", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "2ac5c3db-12ee-433b-96f8-1ba6b0ca22db" ], + "CommandName": [ "New-AzSelfHelpDiagnostic" ], + "FullCommandName": [ "New-AzSelfHelpDiagnostic_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "38552cba-a114-4cad-b4c4-3c0fa784c792" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "38552cba-a114-4cad-b4c4-3c0fa784c792" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204712Z:38552cba-a114-4cad-b4c4-3c0fa784c792" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3694643DCBD0466EA8A6306A0D6E4CD7 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:47:12Z" ], + "Date": [ "Fri, 05 Apr 2024 20:47:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "229" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Diagnostics/yku6n4wiej/operationResults/0b4e0071-7115-4d30-b75e-874f9163e87f\",\"name\":\"0b4e0071-7115-4d30-b75e-874f9163e87f\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "New-AzSelfHelpDiagnostic+[NoContext]+CreateExpanded+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "2ac5c3db-12ee-433b-96f8-1ba6b0ca22db" ], + "CommandName": [ "New-AzSelfHelpDiagnostic" ], + "FullCommandName": [ "New-AzSelfHelpDiagnostic_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "c4d379ba-d20f-40b5-a9d2-70403b1346bf" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "74" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "c4d379ba-d20f-40b5-a9d2-70403b1346bf" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204713Z:c4d379ba-d20f-40b5-a9d2-70403b1346bf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6A4D9AEC59E04E3D81955777B989C4C4 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:47:12Z" ], + "Date": [ "Fri, 05 Apr 2024 20:47:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2289" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/diagnostics/yku6n4wiej\",\"name\":\"yku6n4wiej\",\"type\":\"Microsoft.Help/Diagnostics\",\"properties\":{\"provisioningState\":\"Succeeded\",\"acceptedAt\":\"2024-04-05T20:46:42.1848827Z\",\"diagnostics\":[{\"solutionId\":\"Demo2InsightV2\",\"status\":\"Succeeded\",\"insights\":[{\"id\":\"perfinsights-available-linux\",\"title\":\"Windows Unable to Boot Test hardcoded string for unknown resource (Demo Insight)\",\"results\":\"\u003c!--issueDescription--\u003e\\n\u003cp\u003eWe have detected that PerfInsights is already installed on your VM. You can run PerfInsights on-demand through the Portal and view reports for your analysis.\u003c/p\u003e\\n\u003c!--/issueDescription--\u003e\\n\u003cp\u003ePerfInsights is a diagnostics tool that can help you analyze operating system level metrics such as:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003eBest Practices recommendations for Linux\u003c/li\u003e\\n\u003cli\u003eTop CPU consumers\u003c/li\u003e\\n\u003cli\u003eTop Memory consumers\u003c/li\u003e\\n\u003cli\u003eStorage/RAID/LVM layout\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch2\u003e\u003cstrong\u003eRecommended Steps\u003c/strong\u003e\u003c/h2\u003e\\n\u003cp\u003e\u003ca data-blade=\\\"Microsoft_Azure_Compute.PerformanceDiagnosticsBlade.resourceId.$resourceId\\\" button-data-blade=\\\"button-data-blade\\\"\u003eRun PerfInsights\u003c/a\u003e\u003c/p\u003e\\n\u003cp\u003eFor the machine \u003c!--$vmname--\u003e[vmname]\u003c!--/$vmname--\u003e, you can \u003ca href=\\\"https://portal.azure.com/#@microsoft.onmicrosoft.com/resource/{$resourceIdDecoded}/performanceDiagnostics\\\"\u003eaccess PerfInsights here\u003c/a\u003e and review results directly in the Azure portal.\u003c/p\u003e\\n\u003cp\u003eYou may also \u003ca href=\\\"https://docs.microsoft.com/azure/virtual-machines/troubleshooting/performance-diagnostics#install-and-run-performance-diagnostics-on-your-vm\\\"\u003edownload PerfInsights\u003c/a\u003e and run it on your virtual machine.\u003c/p\u003e\\n\u003cp\u003eIf you open a support case, attach the PerfInsights report for the Support Engineer to analyze.\u003c/p\u003e\\n\u003ch2\u003e\u003cstrong\u003eRecommended Documents\u003c/strong\u003e\u003c/h2\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/virtual-machines/troubleshooting/how-to-use-perfinsights\\\"\u003eHow to use PerfInsights\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-performance-bottlenecks-linux\\\"\u003eTroubleshoot performance and isolate bottlenecks in Linux\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\",\"importanceLevel\":\"Warning\"}]}]}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Tests.ps1 index d1e443b00711..285da96b1fb9 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpDiagnostic.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzSelfHelpDiagnostic')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzSelfHelpDiagnostic' -Tag 'LiveOnly' { +Describe 'New-AzSelfHelpDiagnostic' -Tag 'LiveOnly'{ It 'CreateExpanded' { { $resourceName = RandomString -allChars $false -len 10 diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Recording.json new file mode 100644 index 000000000000..98bb96dd036d --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Recording.json @@ -0,0 +1,130 @@ +{ + "New-AzSelfHelpSimplifiedSolution+[NoContext]+Create+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"9004345-7759\",\n \"parameters\": {\n \"SearchText\": \"Billing\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "115" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5/operationResults/a8ace90b-9ffb-4106-8979-57aaeff83c51?api-version=2024-03-01-preview\u0026t=638479468481390902\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=e88UI-TU1AYK7dsBbUE94kWjc3LpsZfg1Cxh3kbBKUqCLYNPwqb_kRj8ob7H9XnmM4WDBHc5ytuDo7EHkCqmprI1Z8bBaf3t-M2yz0021Q7yDiHgbhYnSNL5M7gSJtbYjXAXm2FNcT4QpvQ1vUwutVirKSrPfnvNwPelyi1bWqOv9ieaAMI0skUfbK6XrRpOYfo1Vh4os3Wo-3CiRXtuFbmZaytuyevmxzKwRPDbsVL-poa7vBIa7iFd2owB12kEKwKhecwTE42CtQmrnopFtNRj4qJCKb_zvTc8VqFdCm64Fi9SKnPb91XdguGRJkoImjL__KH9Et_gzhXxW00B0Q\u0026h=K6Qjh4u7m__UwPj-QHH8OQ9SpSO3MEKsH4uPoxR5kGw" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5/operationResults/a8ace90b-9ffb-4106-8979-57aaeff83c51?api-version=2024-03-01-preview\u0026t=638479468481390902\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=e88UI-TU1AYK7dsBbUE94kWjc3LpsZfg1Cxh3kbBKUqCLYNPwqb_kRj8ob7H9XnmM4WDBHc5ytuDo7EHkCqmprI1Z8bBaf3t-M2yz0021Q7yDiHgbhYnSNL5M7gSJtbYjXAXm2FNcT4QpvQ1vUwutVirKSrPfnvNwPelyi1bWqOv9ieaAMI0skUfbK6XrRpOYfo1Vh4os3Wo-3CiRXtuFbmZaytuyevmxzKwRPDbsVL-poa7vBIa7iFd2owB12kEKwKhecwTE42CtQmrnopFtNRj4qJCKb_zvTc8VqFdCm64Fi9SKnPb91XdguGRJkoImjL__KH9Et_gzhXxW00B0Q\u0026h=K6Qjh4u7m__UwPj-QHH8OQ9SpSO3MEKsH4uPoxR5kGw" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "06bb664a-3472-4caf-acf8-81c77de17431" ], + "x-ms-correlation-request-id": [ "06bb664a-3472-4caf-acf8-81c77de17431" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204728Z:06bb664a-3472-4caf-acf8-81c77de17431" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 659A4AA8C33941E292DEE1AC9D4FCE2D Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:47:27Z" ], + "Date": [ "Fri, 05 Apr 2024 20:47:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5\",\"name\":\"hbk16wuga5\",\"type\":\"Microsoft.Help/simplifiedSolutions\",\"properties\":{\"title\":\"Catch-all: Microsoft Graph API issues\",\"content\":\"\u003ch2\u003eTroubleshoot issues with the Microsoft Graph API\u003c/h2\u003e\\n\u003cp\u003e\u003cstrong\u003eNotice:\u003c/strong\u003e Azure Active Directory (Azure AD) is being renamed to Microsoft Entra ID. No customer action is required. Capabilities, licensing, pricing, service level agreements, APIs, authentication and developer experiences are not impacted. \u003ca href=\\\"https://learn.microsoft.com/azure/active-directory/fundamentals/new-name\\\"\u003eLearn more\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eUse the following guidance to troubleshoot Microsoft Graph API issues, including issues related to authentication, authorization, and API. You\u0027ll also find information about the end of support for Azure AD Authentication Library (ADAL) and Azure AD Graph API.\u003c/p\u003e\\n\u003cp\u003eScan the following headings and select one or more that will help resolve your issue.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eEnd of support for Azure AD Graph API and Azure Active Directory Authentication Library\u003c/h2\u003e\u003ch3\u003eAzure Active Directory Graph API deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure AD Graph APIs will be retired by March 30, 2024.\u003c/em\u003e See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e. We want to make sure that all customers migrate off and discourage applications from taking production dependencies on Azure AD Graph. Investments in the new features and functionalities will be made only to \u003ca href=\\\"https://learn.microsoft.com/graph/overview\\\"\u003eMicrosoft Graph\u003c/a\u003e. Going forward, we\u0027ll continue to support Azure AD Graph with security-related fixes.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing migration from Azure AD Graph to Microsoft Graph. For more information, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003eMigrate Azure AD Graph apps to Microsoft Graph - Microsoft Graph | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eMicrosoft Entra ID and MSOnline PowerShell deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell cmdlets will be retired by March 30, 2024 See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e.\u003c/em\u003e The three modules will continue to work with minimal investment, apart from security updates.\u003c/p\u003e\\n\u003cp\u003eWe encourage you to continue migrating to The Microsoft Graph PowerShell SDK because that continues to be where all our current and future PowerShell investments are being made. We\u0027re also working on tools and documentation for migrating existing scripts and PowerShell processes that rely on the Azure AD Graph and MSOnline module to the Microsoft Graph PowerShell SDK.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0\\\"\u003eFind Microsoft Entra ID and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs\u003c/a\u003e and \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0\\\"\u003eMigrate from Azure AD PowerShell to the Microsoft Graph PowerShell SDK | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eAzure Active Directory Authentication Library retirement\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure Active Directory Authentication Library (ADAL) end-of-support is on June 30, 2023\u003c/em\u003e. While existing ADAL apps may continue to work, no support or security fixes will be provided past end-of-life. In addition, there are no planned ADAL releases prior to end-of-life for features, or planned support for new platform versions.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing the migration of your applications to Microsoft Authentication Library (MSAL). For more information about ADAL to MSAL migration, see \u003ca href=\\\"https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration\\\"\u003eMigrate to the Microsoft Authentication Library - Microsoft Entra | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454\\\"\u003eSeptember 2022 change announcements\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eVideos: Migrating from Azure AD Graph to Microsoft Graph\u003c/h3\u003e\\n\u003cp\u003eThe following videos explain more about migrating from Azure AD Graph to Microsoft Graph.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-video-group-container\\\"\\\"\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/iKK-F2PyoQU?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph to Microsoft Graph\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/oiXMv0xoH1s?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph and MSOL PowerShell to MS Graph PowerShell\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eTroubleshoot Microsoft Graph API issues\u003c/h2\u003e\u003cp\u003eUse the following troubleshooting guidance to resolve Microsoft Graph API issues.\u003c/p\u003e\\n\u003ch3\u003eAzure AD Graph migration\u003c/h3\u003e\\n\u003cp\u003eFor applications using Azure AD Graph, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003emigrate Azure AD Graph apps to Microsoft Graph\u003c/a\u003e.\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eStart with the \u003ca href=\\\"https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist\\\"\u003eapp migration planning checklist\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYour Azure app registration portal shows which applications use Azure AD Graph.\u003c/li\u003e\\n\u003cli\u003eReview your apps source code, and if applicable, contact independent software vendors (ISVs) or app providers. Microsoft support can provide a list of Azure AD Graph usage in your tenant.\u003c/li\u003e\\n\u003cli\u003eIf you\u0027re having issues, post a question on \u003ca href=\\\"https://learn.microsoft.com/en-us/answers/topics/azure-ad-graph-deprecation.html\\\"\u003eMicrosoft Q\u0026amp;A\u003c/a\u003e and tag it with \u003ccode\u003eazure-ad-graph-deprecation\u003c/code\u003e, or post your question on \u003ca href=\\\"https://stackoverflow.com/questions/ask\\\"\u003eStackOverflow\u003c/a\u003e with the \u003ccode\u003eazureadgraph-deprecation\u003c/code\u003e tag.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003cp\u003eReview the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-faq\\\"\u003eAzure AD Graph to Microsoft Graph migration frequently asked questions\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-registration-config-grant-permissions-how-to/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eConfigure how users consent to applications\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-delegated-and-app-perms/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eHow to recognize differences between delegated and application permissions\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eUpgrade from Microsoft Entra ID and MSOnline PowerShell to Microsoft Graph PowerShell\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#why-upgrade-to-microsoft-graph-powershell\\\"\u003eWhy upgrade to Microsoft Graph PowerShell?\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#upgrading-to-microsoft-graph-powershell\\\"\u003eSteps to follow when upgrading to MS Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#limitations\\\"\u003eLimitations\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eCmdlet mappings from Microsoft Entra ID and MSOnline PowerShell modules to MS Graph PowerShell module\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#azure-ad-to-microsoft-graph-powershell-by-category\\\"\u003eMicrosoft Entra ID to Microsoft Graph PowerShell by category\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#msonline-to-microsoft-graph-powershell\\\"\u003eMSOnline to Microsoft Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eAuthentication or authorization issues\u003c/h3\u003e\\n\u003cp\u003eSee the following resources to resolve authentication or authorization issues:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cp\u003eAuthorization errors can occur for several reasons, most of which generate a 403 error, with a few exceptions. For example, the following scenarios can lead to authorization errors:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-scenarios\\\"\u003eIncorrect access token acquisition flows\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-scopes\\\"\u003ePoorly configured permission scopes\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview#understanding-user-and-admin-consent\\\"\u003eLack of consent\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent\\\"\u003eLack of permissions\u003c/a\u003e \u003cbr\u003e\\nFor more information, see \u003ca href=\\\"https://docs.microsoft.com/graph/resolve-auth-errors\\\"\u003eResolve Microsoft Graph authorization errors\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to implement the OAuth 2.0 authorization code grant flow. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-user\\\"\u003eGet access on behalf of a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to program directly against the code grant (PKCE) flow in your application using any language, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow\\\"\u003eMicrosoft identity platform and OAuth 2.0 authorization code flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eConfigure a service and use the OAuth client credentials grant flow to get an access token. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-service\\\"\u003eGet access without a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the client credentials flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow\\\"\u003eMicrosoft identity platform and the OAuth 2.0 client credentials flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the resource owner password credential (ROPC) flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc\\\"\u003eMicrosoft identity platform and OAuth 2.0 resource owner password credentials\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eThe Microsoft identity platform only supports ROPC for Microsoft Entra tenants, not personal accounts. This means that you must use a tenant-specific endpoint, for example, \u0026quot;//login.microsoftonline.com/{TenantId_or_Name}\u0026quot; or the \u003cem\u003eorganization\u0027s\u003c/em\u003e endpoint.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003ePersonal accounts that are invited to a Microsoft Entra tenant can\u0027t use ROPC.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAccounts that don\u0027t have passwords can\u0027t sign in through ROPC. In this case, we recommend using a different flow for your app.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eIf users need to use \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/authentication/concept-mfa-howitworks\\\"\u003emultifactor authentication (MFA)\u003c/a\u003e to sign in to the application, they\u0027ll be blocked instead.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eROPC is not supported in \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/whatis-fed\\\"\u003ehybrid identity federation\u003c/a\u003e scenarios. For example, Microsoft Entra ID and Active Directory Federation Services (AD FS) previously authenticated on-premises accounts. If users are full-page redirected to an on-premises identity provider, Microsoft Entra ID is not able to test the username and password against that identity provider. \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-pta\\\"\u003ePass-through authentication\u003c/a\u003e is supported with ROPC, however.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAn exception to a hybrid identity federation scenario would be the following: home realm discovery (HRD) policy with \u003ccode\u003eAllowCloudPasswordValidation\u003c/code\u003e set to \u003ccode\u003eTRUE\u003c/code\u003e will enable ROPC flow to work for federated users when the on-premises password is synced to the cloud. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/manage-apps/configure-authentication-for-federated-users-portal#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications\\\"\u003eEnable direct ROPC authentication of federated users for legacy applications\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eQuery data from API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Graph supports optional query parameters you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints. See \u003ca href=\\\"https://docs.microsoft.com/graph/query-parameters#odata-system-query-options\\\"\u003eUse query parameters to customize responses\u003c/a\u003e for more information.\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta\\\"\u003euser resource type\u003c/a\u003e. This represents a Microsoft Entra user account and inherits from directoryObject. For performance reasons, the \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-post-users?view=graph-rest-beta\\\"\u003ecreate\u003c/a\u003e, \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-get?view=graph-rest-beta\\\"\u003eget\u003c/a\u003e, and \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-list?view=graph-rest-beta\\\"\u003elist\u003c/a\u003e operations return only a subset of more commonly used properties by default. These default properties are noted in the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta#properties\\\"\u003eproperties\u003c/a\u003e section. To get any of the properties that are not returned by default, specify them in a \u003ccode\u003e$select\u003c/code\u003e OData query option.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/attachment?view=graph-rest-1.0\\\"\u003eattachment resource type\u003c/a\u003e. You can add related content to a user event, message, or post in the form of an attachment. Attachment is the base resource for the following derived types of attachments:\\n\u003cul\u003e\\n\u003cli\u003eA file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/fileattachment?view=graph-rest-1.0\\\"\u003efileAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eAn item (contact, event or message, represented by an \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/itemattachment?view=graph-rest-1.0\\\"\u003eitemAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eA link to a file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/referenceattachment?view=graph-rest-1.0\\\"\u003ereferenceAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/schemaextension?view=graph-rest-1.0\\\"\u003eschemaExtension resource type (schema extensions)\u003c/a\u003e. Schema extensions allow you to define a schema to extend and add strongly typed custom data to a resource type. The custom data appears as a complex type on the extended resource. See the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eschema extension example\u003c/a\u003e to learn how to add custom data to groups.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eMicrosoft Graph API endpoints\u003c/h3\u003e\\n\u003cp\u003eSee the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide\\\"\u003eOffice 365 URLs and IP address ranges\u003c/a\u003e - This article contains most of the endpoints for Azure and M365, including Azure and Microsoft Graph.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0\\\"\u003eMicrosoft Graph REST API v1.0 reference\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-beta#call-the-v10-endpoint\\\"\u003eMicrosoft Graph beta endpoint reference\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eReports and logs\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Entra ID tracks user activity and creates reports that help you understand how your users access and use Microsoft Entra services. Use the Microsoft Graph API for Microsoft Entra ID to analyze the data in these reports and to create custom solutions tailored to your organization\u0027s specific needs. The availability of these activity reports is governed by the Microsoft Entra data retention policies.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eFor more information, see:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0\\\"\u003eActivity reports API overview\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-long-does-azure-ad-store-the-data\\\"\u003eData retention policies\u003c/a\u003e.\u003cbr\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cul\u003e\\n\u003cli\u003eWith Microsoft Graph, you can access Microsoft 365 usage reports resources to get information about how people in your business are using Microsoft 365 services. For example, you can identify who\u0027s using a service a lot and reaching quotas, or who may not need a Microsoft 365 license at all, see \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eWorking with Microsoft 365 usage reports in Microsoft Graph\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eExpose a web API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-expose-web-apis\\\"\u003eQuickStart: Configure an application to expose a web API\u003c/a\u003e. In this QuickStart, register a web API with the Microsoft identity platform and expose it to client apps by adding an example scope. By registering your web API and exposing it through scopes, you can provide permission-based access to its resources to authorized users and client apps that access your API.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eCommon issues and solutions\u003c/h2\u003e\u003ch3\u003eThe API I\u0027m calling doesn\u0027t work\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eTest Microsoft Graph APIs in your tenant or a demo tenant. Also, check out the sample queries in \u003ca href=\\\"https://developer.microsoft.com/graph/graph-explorer\\\"\u003eMicrosoft Graph Explorer\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eLearn how to configure the code for your daemon application that calls web APIs, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/scenario-daemon-app-configuration?tabs=dotnet\\\"\u003eDaemon app that calls web APIs - code configuration\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I check the status of service availability and connectivity?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eThe service availability and connectivity of the underlying services that can be accessed through Microsoft Graph can impact on the overall availability and performance of Microsoft Graph.\\n\u003cul\u003e\\n\u003cli\u003eFor Microsoft Entra service health, check the status of \u003cstrong\u003eSecurity + Identity\u003c/strong\u003e services listed in the \u003ca href=\\\"https://azure.microsoft.com/status/\\\"\u003eAzure status page\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eFor Office services that contribute to Microsoft Graph, check the status of services listed in the \u003ca href=\\\"https://portal.office.com/adminportal/home#/servicehealth\\\"\u003eOffice Service Health Dashboard\u003c/a\u003e. Microsoft Graph authorization errors can be a result of several issues, most of which generate a 401 or 403 error.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I find more information on errors and known issues?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/errors\\\"\u003eMicrosoft Graph error response information\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/known-issues\\\"\u003eKnown issues with Microsoft Graph\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003cdiv class=\\\"simplified-solution-web-results-container\\\"\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eAzure Docs\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/en-us/azure/programmable-connectivity/azure-programmable-connectivity-billing\\\" target=\\\"_blank\\\"\u003eConsolidated Billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003e...billing, enabling developers to receive a unified invoice from Azure for all their API plans, rather than managing separate bills from various operators. This streamlined approach not only reduces ...\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eCommunity\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/answers/questions/928000/\\\" target=\\\"_blank\\\"\u003eazure billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003eI was cancelled my subscription but still it is billing.\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\",\"provisioningState\":\"Succeeded\",\"appendix\":{}}}", + "isContentBase64": false + } + }, + "New-AzSelfHelpSimplifiedSolution+[NoContext]+Create+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5/operationResults/a8ace90b-9ffb-4106-8979-57aaeff83c51?api-version=2024-03-01-preview\u0026t=638479468481390902\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=e88UI-TU1AYK7dsBbUE94kWjc3LpsZfg1Cxh3kbBKUqCLYNPwqb_kRj8ob7H9XnmM4WDBHc5ytuDo7EHkCqmprI1Z8bBaf3t-M2yz0021Q7yDiHgbhYnSNL5M7gSJtbYjXAXm2FNcT4QpvQ1vUwutVirKSrPfnvNwPelyi1bWqOv9ieaAMI0skUfbK6XrRpOYfo1Vh4os3Wo-3CiRXtuFbmZaytuyevmxzKwRPDbsVL-poa7vBIa7iFd2owB12kEKwKhecwTE42CtQmrnopFtNRj4qJCKb_zvTc8VqFdCm64Fi9SKnPb91XdguGRJkoImjL__KH9Et_gzhXxW00B0Q\u0026h=K6Qjh4u7m__UwPj-QHH8OQ9SpSO3MEKsH4uPoxR5kGw+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5/operationResults/a8ace90b-9ffb-4106-8979-57aaeff83c51?api-version=2024-03-01-preview\u0026t=638479468481390902\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=e88UI-TU1AYK7dsBbUE94kWjc3LpsZfg1Cxh3kbBKUqCLYNPwqb_kRj8ob7H9XnmM4WDBHc5ytuDo7EHkCqmprI1Z8bBaf3t-M2yz0021Q7yDiHgbhYnSNL5M7gSJtbYjXAXm2FNcT4QpvQ1vUwutVirKSrPfnvNwPelyi1bWqOv9ieaAMI0skUfbK6XrRpOYfo1Vh4os3Wo-3CiRXtuFbmZaytuyevmxzKwRPDbsVL-poa7vBIa7iFd2owB12kEKwKhecwTE42CtQmrnopFtNRj4qJCKb_zvTc8VqFdCm64Fi9SKnPb91XdguGRJkoImjL__KH9Et_gzhXxW00B0Q\u0026h=K6Qjh4u7m__UwPj-QHH8OQ9SpSO3MEKsH4uPoxR5kGw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "efbcc707-b087-4718-9fee-f03e8ba046c5" ], + "CommandName": [ "New-AzSelfHelpSimplifiedSolution" ], + "FullCommandName": [ "New-AzSelfHelpSimplifiedSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "0cc55cbc-0768-4365-b620-4294d22f5a1c" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "0cc55cbc-0768-4365-b620-4294d22f5a1c" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204758Z:0cc55cbc-0768-4365-b620-4294d22f5a1c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 985E022168B4470F9FF1D6EA74525099 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:47:58Z" ], + "Date": [ "Fri, 05 Apr 2024 20:47:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "237" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5/operationResults/a8ace90b-9ffb-4106-8979-57aaeff83c51\",\"name\":\"a8ace90b-9ffb-4106-8979-57aaeff83c51\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "New-AzSelfHelpSimplifiedSolution+[NoContext]+Create+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "efbcc707-b087-4718-9fee-f03e8ba046c5" ], + "CommandName": [ "New-AzSelfHelpSimplifiedSolution" ], + "FullCommandName": [ "New-AzSelfHelpSimplifiedSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "a7795f95-6d58-45ef-9d65-7aaefa79f328" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "a7795f95-6d58-45ef-9d65-7aaefa79f328" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204759Z:a7795f95-6d58-45ef-9d65-7aaefa79f328" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0D4E357DB7E941A298AD47D54E47610E Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:47:58Z" ], + "Date": [ "Fri, 05 Apr 2024 20:47:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/simplifiedSolutions/hbk16wuga5\",\"name\":\"hbk16wuga5\",\"type\":\"Microsoft.Help/simplifiedSolutions\",\"properties\":{\"title\":\"Catch-all: Microsoft Graph API issues\",\"content\":\"\u003ch2\u003eTroubleshoot issues with the Microsoft Graph API\u003c/h2\u003e\\n\u003cp\u003e\u003cstrong\u003eNotice:\u003c/strong\u003e Azure Active Directory (Azure AD) is being renamed to Microsoft Entra ID. No customer action is required. Capabilities, licensing, pricing, service level agreements, APIs, authentication and developer experiences are not impacted. \u003ca href=\\\"https://learn.microsoft.com/azure/active-directory/fundamentals/new-name\\\"\u003eLearn more\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eUse the following guidance to troubleshoot Microsoft Graph API issues, including issues related to authentication, authorization, and API. You\u0027ll also find information about the end of support for Azure AD Authentication Library (ADAL) and Azure AD Graph API.\u003c/p\u003e\\n\u003cp\u003eScan the following headings and select one or more that will help resolve your issue.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eEnd of support for Azure AD Graph API and Azure Active Directory Authentication Library\u003c/h2\u003e\u003ch3\u003eAzure Active Directory Graph API deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure AD Graph APIs will be retired by March 30, 2024.\u003c/em\u003e See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e. We want to make sure that all customers migrate off and discourage applications from taking production dependencies on Azure AD Graph. Investments in the new features and functionalities will be made only to \u003ca href=\\\"https://learn.microsoft.com/graph/overview\\\"\u003eMicrosoft Graph\u003c/a\u003e. Going forward, we\u0027ll continue to support Azure AD Graph with security-related fixes.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing migration from Azure AD Graph to Microsoft Graph. For more information, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003eMigrate Azure AD Graph apps to Microsoft Graph - Microsoft Graph | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eMicrosoft Entra ID and MSOnline PowerShell deprecation\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell cmdlets will be retired by March 30, 2024 See \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/important-azure-ad-graph-retirement-and-powershell-module/ba-p/3848270\\\"\u003eImportant: Azure AD Graph Retirement and Powershell Module Deprecation\u003c/a\u003e.\u003c/em\u003e The three modules will continue to work with minimal investment, apart from security updates.\u003c/p\u003e\\n\u003cp\u003eWe encourage you to continue migrating to The Microsoft Graph PowerShell SDK because that continues to be where all our current and future PowerShell investments are being made. We\u0027re also working on tools and documentation for migrating existing scripts and PowerShell processes that rely on the Azure AD Graph and MSOnline module to the Microsoft Graph PowerShell SDK.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0\\\"\u003eFind Microsoft Entra ID and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs\u003c/a\u003e and \u003ca href=\\\"https://learn.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0\\\"\u003eMigrate from Azure AD PowerShell to the Microsoft Graph PowerShell SDK | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eAzure Active Directory Authentication Library retirement\u003c/h3\u003e\\n\u003cp\u003e\u003cem\u003eAzure Active Directory Authentication Library (ADAL) end-of-support is on June 30, 2023\u003c/em\u003e. While existing ADAL apps may continue to work, no support or security fixes will be provided past end-of-life. In addition, there are no planned ADAL releases prior to end-of-life for features, or planned support for new platform versions.\u003c/p\u003e\\n\u003cp\u003eWe recommend prioritizing the migration of your applications to Microsoft Authentication Library (MSAL). For more information about ADAL to MSAL migration, see \u003ca href=\\\"https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration\\\"\u003eMigrate to the Microsoft Authentication Library - Microsoft Entra | Microsoft Docs\u003c/a\u003e.\u003c/p\u003e\\n\u003cp\u003eFor more information, see \u003ca href=\\\"https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/microsoft-entra-change-announcements-september-2022-train/ba-p/2967454\\\"\u003eSeptember 2022 change announcements\u003c/a\u003e.\u003c/p\u003e\\n\u003ch3\u003eVideos: Migrating from Azure AD Graph to Microsoft Graph\u003c/h3\u003e\\n\u003cp\u003eThe following videos explain more about migrating from Azure AD Graph to Microsoft Graph.\u003c/p\u003e\\n\u003cdiv class=\\\"simplified-solution-video-group-container\\\"\\\"\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/iKK-F2PyoQU?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph to Microsoft Graph\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-video-container\\\"\u003e \u003ciframe class=\\\"simplified-solution-video-group-iframe\\\"\\\" id=\\\"\\\" src=\\\"https://www.youtube-nocookie.com/embed/oiXMv0xoH1s?enablejsapi=1\u0026rel=0 title=\\\"How to migrate from Azure AD Graph and MSOL PowerShell to MS Graph PowerShell\\\"\\\" frameborder=\\\"0\\\" allowfullscreen\u003e\u003c/iframe\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eTroubleshoot Microsoft Graph API issues\u003c/h2\u003e\u003cp\u003eUse the following troubleshooting guidance to resolve Microsoft Graph API issues.\u003c/p\u003e\\n\u003ch3\u003eAzure AD Graph migration\u003c/h3\u003e\\n\u003cp\u003eFor applications using Azure AD Graph, see \u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-overview\\\"\u003emigrate Azure AD Graph apps to Microsoft Graph\u003c/a\u003e.\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eStart with the \u003ca href=\\\"https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist\\\"\u003eapp migration planning checklist\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYour Azure app registration portal shows which applications use Azure AD Graph.\u003c/li\u003e\\n\u003cli\u003eReview your apps source code, and if applicable, contact independent software vendors (ISVs) or app providers. Microsoft support can provide a list of Azure AD Graph usage in your tenant.\u003c/li\u003e\\n\u003cli\u003eIf you\u0027re having issues, post a question on \u003ca href=\\\"https://learn.microsoft.com/en-us/answers/topics/azure-ad-graph-deprecation.html\\\"\u003eMicrosoft Q\u0026amp;A\u003c/a\u003e and tag it with \u003ccode\u003eazure-ad-graph-deprecation\u003c/code\u003e, or post your question on \u003ca href=\\\"https://stackoverflow.com/questions/ask\\\"\u003eStackOverflow\u003c/a\u003e with the \u003ccode\u003eazureadgraph-deprecation\u003c/code\u003e tag.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003cp\u003eReview the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://learn.microsoft.com/graph/migrate-azure-ad-graph-faq\\\"\u003eAzure AD Graph to Microsoft Graph migration frequently asked questions\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-registration-config-grant-permissions-how-to/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eConfigure how users consent to applications\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/application-dev-delegated-and-app-perms/?WT.mc_id=UI_AAD_Registered_Apps_Support_L2_Overview\\\"\u003eHow to recognize differences between delegated and application permissions\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eUpgrade from Microsoft Entra ID and MSOnline PowerShell to Microsoft Graph PowerShell\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eMicrosoft Entra ID, Microsoft Entra ID Preview, and MSOnline PowerShell modules are planned for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#why-upgrade-to-microsoft-graph-powershell\\\"\u003eWhy upgrade to Microsoft Graph PowerShell?\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#upgrading-to-microsoft-graph-powershell\\\"\u003eSteps to follow when upgrading to MS Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/migration-steps?view=graph-powershell-1.0#limitations\\\"\u003eLimitations\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003cstrong\u003eCmdlet mappings from Microsoft Entra ID and MSOnline PowerShell modules to MS Graph PowerShell module\u003c/strong\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#azure-ad-to-microsoft-graph-powershell-by-category\\\"\u003eMicrosoft Entra ID to Microsoft Graph PowerShell by category\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/powershell/microsoftgraph/azuread-msoline-cmdlet-map?view=graph-powershell-1.0#msonline-to-microsoft-graph-powershell\\\"\u003eMSOnline to Microsoft Graph PowerShell\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eAuthentication or authorization issues\u003c/h3\u003e\\n\u003cp\u003eSee the following resources to resolve authentication or authorization issues:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cp\u003eAuthorization errors can occur for several reasons, most of which generate a 403 error, with a few exceptions. For example, the following scenarios can lead to authorization errors:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-scenarios\\\"\u003eIncorrect access token acquisition flows\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-v2-scopes\\\"\u003ePoorly configured permission scopes\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview#understanding-user-and-admin-consent\\\"\u003eLack of consent\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent\\\"\u003eLack of permissions\u003c/a\u003e \u003cbr\u003e\\nFor more information, see \u003ca href=\\\"https://docs.microsoft.com/graph/resolve-auth-errors\\\"\u003eResolve Microsoft Graph authorization errors\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to implement the OAuth 2.0 authorization code grant flow. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-user\\\"\u003eGet access on behalf of a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eLearn how to program directly against the code grant (PKCE) flow in your application using any language, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow\\\"\u003eMicrosoft identity platform and OAuth 2.0 authorization code flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eConfigure a service and use the OAuth client credentials grant flow to get an access token. See \u003ca href=\\\"https://docs.microsoft.com/graph/auth-v2-service\\\"\u003eGet access without a user\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the client credentials flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow\\\"\u003eMicrosoft identity platform and the OAuth 2.0 client credentials flow\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eProgram directly against the resource owner password credential (ROPC) flow in your application. See \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc\\\"\u003eMicrosoft identity platform and OAuth 2.0 resource owner password credentials\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eThe Microsoft identity platform only supports ROPC for Microsoft Entra tenants, not personal accounts. This means that you must use a tenant-specific endpoint, for example, \u0026quot;//login.microsoftonline.com/{TenantId_or_Name}\u0026quot; or the \u003cem\u003eorganization\u0027s\u003c/em\u003e endpoint.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003ePersonal accounts that are invited to a Microsoft Entra tenant can\u0027t use ROPC.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAccounts that don\u0027t have passwords can\u0027t sign in through ROPC. In this case, we recommend using a different flow for your app.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eIf users need to use \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/authentication/concept-mfa-howitworks\\\"\u003emultifactor authentication (MFA)\u003c/a\u003e to sign in to the application, they\u0027ll be blocked instead.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eROPC is not supported in \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/whatis-fed\\\"\u003ehybrid identity federation\u003c/a\u003e scenarios. For example, Microsoft Entra ID and Active Directory Federation Services (AD FS) previously authenticated on-premises accounts. If users are full-page redirected to an on-premises identity provider, Microsoft Entra ID is not able to test the username and password against that identity provider. \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-pta\\\"\u003ePass-through authentication\u003c/a\u003e is supported with ROPC, however.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003cli\u003e\u003cp\u003eAn exception to a hybrid identity federation scenario would be the following: home realm discovery (HRD) policy with \u003ccode\u003eAllowCloudPasswordValidation\u003c/code\u003e set to \u003ccode\u003eTRUE\u003c/code\u003e will enable ROPC flow to work for federated users when the on-premises password is synced to the cloud. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/manage-apps/configure-authentication-for-federated-users-portal#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications\\\"\u003eEnable direct ROPC authentication of federated users for legacy applications\u003c/a\u003e.\u003c/p\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eQuery data from API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Graph supports optional query parameters you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints. See \u003ca href=\\\"https://docs.microsoft.com/graph/query-parameters#odata-system-query-options\\\"\u003eUse query parameters to customize responses\u003c/a\u003e for more information.\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta\\\"\u003euser resource type\u003c/a\u003e. This represents a Microsoft Entra user account and inherits from directoryObject. For performance reasons, the \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-post-users?view=graph-rest-beta\\\"\u003ecreate\u003c/a\u003e, \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-get?view=graph-rest-beta\\\"\u003eget\u003c/a\u003e, and \u003ca href=\\\"https://docs.microsoft.com/graph/api/user-list?view=graph-rest-beta\\\"\u003elist\u003c/a\u003e operations return only a subset of more commonly used properties by default. These default properties are noted in the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/user?view=graph-rest-beta#properties\\\"\u003eproperties\u003c/a\u003e section. To get any of the properties that are not returned by default, specify them in a \u003ccode\u003e$select\u003c/code\u003e OData query option.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/attachment?view=graph-rest-1.0\\\"\u003eattachment resource type\u003c/a\u003e. You can add related content to a user event, message, or post in the form of an attachment. Attachment is the base resource for the following derived types of attachments:\\n\u003cul\u003e\\n\u003cli\u003eA file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/fileattachment?view=graph-rest-1.0\\\"\u003efileAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eAn item (contact, event or message, represented by an \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/itemattachment?view=graph-rest-1.0\\\"\u003eitemAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003eA link to a file (\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/referenceattachment?view=graph-rest-1.0\\\"\u003ereferenceAttachment\u003c/a\u003e resource).\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/schemaextension?view=graph-rest-1.0\\\"\u003eschemaExtension resource type (schema extensions)\u003c/a\u003e. Schema extensions allow you to define a schema to extend and add strongly typed custom data to a resource type. The custom data appears as a complex type on the extended resource. See the \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eschema extension example\u003c/a\u003e to learn how to add custom data to groups.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eMicrosoft Graph API endpoints\u003c/h3\u003e\\n\u003cp\u003eSee the following resources for more information:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide\\\"\u003eOffice 365 URLs and IP address ranges\u003c/a\u003e - This article contains most of the endpoints for Azure and M365, including Azure and Microsoft Graph.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0\\\"\u003eMicrosoft Graph REST API v1.0 reference\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/overview?view=graph-rest-beta#call-the-v10-endpoint\\\"\u003eMicrosoft Graph beta endpoint reference\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eReports and logs\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eMicrosoft Entra ID tracks user activity and creates reports that help you understand how your users access and use Microsoft Entra services. Use the Microsoft Graph API for Microsoft Entra ID to analyze the data in these reports and to create custom solutions tailored to your organization\u0027s specific needs. The availability of these activity reports is governed by the Microsoft Entra data retention policies.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eFor more information, see:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0\\\"\u003eActivity reports API overview\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-long-does-azure-ad-store-the-data\\\"\u003eData retention policies\u003c/a\u003e.\u003cbr\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cul\u003e\\n\u003cli\u003eWith Microsoft Graph, you can access Microsoft 365 usage reports resources to get information about how people in your business are using Microsoft 365 services. For example, you can identify who\u0027s using a service a lot and reaching quotas, or who may not need a Microsoft 365 license at all, see \u003ca href=\\\"https://docs.microsoft.com/graph/api/resources/report?view=graph-rest-1.0\\\"\u003eWorking with Microsoft 365 usage reports in Microsoft Graph\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eExpose a web API\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-expose-web-apis\\\"\u003eQuickStart: Configure an application to expose a web API\u003c/a\u003e. In this QuickStart, register a web API with the Microsoft identity platform and expose it to client apps by adding an example scope. By registering your web API and exposing it through scopes, you can provide permission-based access to its resources to authorized users and client apps that access your API.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cbr /\u003e\u003c/div\u003e\u003cdiv class=\\\"simplified-solution-section\\\"\u003e\u003cbr /\u003e\u003ch2\u003eCommon issues and solutions\u003c/h2\u003e\u003ch3\u003eThe API I\u0027m calling doesn\u0027t work\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eTest Microsoft Graph APIs in your tenant or a demo tenant. Also, check out the sample queries in \u003ca href=\\\"https://developer.microsoft.com/graph/graph-explorer\\\"\u003eMicrosoft Graph Explorer\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eLearn how to configure the code for your daemon application that calls web APIs, see \u003ca href=\\\"https://docs.microsoft.com/azure/active-directory/develop/scenario-daemon-app-configuration?tabs=dotnet\\\"\u003eDaemon app that calls web APIs - code configuration\u003c/a\u003e.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I check the status of service availability and connectivity?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003eThe service availability and connectivity of the underlying services that can be accessed through Microsoft Graph can impact on the overall availability and performance of Microsoft Graph.\\n\u003cul\u003e\\n\u003cli\u003eFor Microsoft Entra service health, check the status of \u003cstrong\u003eSecurity + Identity\u003c/strong\u003e services listed in the \u003ca href=\\\"https://azure.microsoft.com/status/\\\"\u003eAzure status page\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eFor Office services that contribute to Microsoft Graph, check the status of services listed in the \u003ca href=\\\"https://portal.office.com/adminportal/home#/servicehealth\\\"\u003eOffice Service Health Dashboard\u003c/a\u003e. Microsoft Graph authorization errors can be a result of several issues, most of which generate a 401 or 403 error.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eWhere can I find more information on errors and known issues?\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/errors\\\"\u003eMicrosoft Graph error response information\u003c/a\u003e\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/graph/known-issues\\\"\u003eKnown issues with Microsoft Graph\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003cdiv class=\\\"simplified-solution-web-results-container\\\"\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eAzure Docs\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/en-us/azure/programmable-connectivity/azure-programmable-connectivity-billing\\\" target=\\\"_blank\\\"\u003eConsolidated Billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003e...billing, enabling developers to receive a unified invoice from Azure for all their API plans, rather than managing separate bills from various operators. This streamlined approach not only reduces ...\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003cdiv class=\\\"simplified-solution-web-result-container\\\"\u003e\u003ch5\u003eCommunity\u003c/h5\u003e\u003cdiv\u003e\u003ca href=\\\"https://docs.microsoft.com/answers/questions/928000/\\\" target=\\\"_blank\\\"\u003eazure billing\u003c/a\u003e\u003c/div\u003e\u003cp\u003eI was cancelled my subscription but still it is billing.\u003c/p\u003e\u003c/div\u003e\u003cbr/\u003e\u003c/div\u003e\\n\u003cbr /\u003e\u003c/div\u003e\",\"provisioningState\":\"Succeeded\",\"appendix\":{}}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Tests.ps1 new file mode 100644 index 000000000000..6d71fcb4d19c --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSimplifiedSolution.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSelfHelpSimplifiedSolution')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSelfHelpSimplifiedSolution.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSelfHelpSimplifiedSolution' -Tag 'LiveOnly'{ + It 'Create' { + { + $resourceName = RandomString -allChars $false -len 10 + $solutionId = "9004345-7759" + $parameters = [ordered]@{ + + "SearchText" = "Billing" + } + New-AzSelfHelpSimplifiedSolution -Scope $env.scope -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters + } | Should -Not -Throw + } +} diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Recording.json new file mode 100644 index 000000000000..11176e478329 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Recording.json @@ -0,0 +1,130 @@ +{ + "New-AzSelfHelpSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"triggerCriteria\": [\n {\n \"name\": \"SolutionId\",\n \"value\": \"apollo-cognitve-search-custom-skill\"\n }\n ],\n \"parameters\": {\n \"SearchText\": \"Can not Search\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "221" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/uf6atzgmwl/operationResults/0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea?api-version=2024-03-01-preview\u0026t=638479468941293870\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=Ndr19lMY0U1qfAlNUgObwICitFb0UasI2OViz8_4Aa-cZ4WS8OlFfd0qepLqgNDJ71gME28NbXnXDsM0H_Fsp9Ke3JxTXjiwgB4CFpIyWdtGk13K6QCGQTHSjy4-ezxaw6fu_ask6amAuMny10g-oloZzLRhql834mnk-v4Ulvn1sD45bIWOSWil4E2sr6sViiF74wcwz0P2i-hVjoicO41w9OpH7fNk6tUlobvRuWEBuFCDnp8LLxPMtU17szE6fQgd0pxWGmqjB9iK0NAGSjdhShKCmDlbBY2oQrrudWVOfEkpkT-JN_iqvSCKkTlScW4AWlv7fZLVtlOVKp4p1Q\u0026h=zrMvXqY-5SlIdSQfMMKYWPMBzMDYDZViiLyhbRmw2Xg" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/uf6atzgmwl/operationResults/0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea?api-version=2024-03-01-preview\u0026t=638479468941137664\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=FCpXgI3TlimdXKJHFUJ8mFms7ZGkkPUsGcVSqgPsCv_dW4G4S320LtalT-3V8njr__44cSarv1ac0UmODosxQVDTFjnRDd_J6mf0IPIKtUZu4rIV0geaOvcR06s3yoOrUMWzeynZGabon_QS3cvTLknXbzMc11n2Oku5TTKqa2lQVzuCmTcQkmDuK4qpmLe0VSt4AQTC4uaAIYyoUWgvrZF3lu5I-vuAZEh7UQLKszeqWeVddF48yvfpcQtYzwit29EjyH-uDNFLslIQI3s_xJW2RaYGr5ZoTWe3j5nlWRRlRuNiquVIX9Sc0qQ6krx_yBZaFw6erjBC2oJyr-NIoQ\u0026h=43BxRq4zmlQn9UoNAnKk1iI4MY8XWguTWGxv7PqeJZ0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "18f95bed-c838-4465-90dc-649f67fbc9fc" ], + "x-ms-correlation-request-id": [ "18f95bed-c838-4465-90dc-649f67fbc9fc" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204814Z:18f95bed-c838-4465-90dc-649f67fbc9fc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 168BFBB50AC64F5791356708464E3D36 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:48:13Z" ], + "Date": [ "Fri, 05 Apr 2024 20:48:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl\",\"name\":\"uf6atzgmwl\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New-AzSelfHelpSolution+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/uf6atzgmwl/operationResults/0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea?api-version=2024-03-01-preview\u0026t=638479468941137664\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=FCpXgI3TlimdXKJHFUJ8mFms7ZGkkPUsGcVSqgPsCv_dW4G4S320LtalT-3V8njr__44cSarv1ac0UmODosxQVDTFjnRDd_J6mf0IPIKtUZu4rIV0geaOvcR06s3yoOrUMWzeynZGabon_QS3cvTLknXbzMc11n2Oku5TTKqa2lQVzuCmTcQkmDuK4qpmLe0VSt4AQTC4uaAIYyoUWgvrZF3lu5I-vuAZEh7UQLKszeqWeVddF48yvfpcQtYzwit29EjyH-uDNFLslIQI3s_xJW2RaYGr5ZoTWe3j5nlWRRlRuNiquVIX9Sc0qQ6krx_yBZaFw6erjBC2oJyr-NIoQ\u0026h=43BxRq4zmlQn9UoNAnKk1iI4MY8XWguTWGxv7PqeJZ0+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/uf6atzgmwl/operationResults/0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea?api-version=2024-03-01-preview\u0026t=638479468941137664\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=FCpXgI3TlimdXKJHFUJ8mFms7ZGkkPUsGcVSqgPsCv_dW4G4S320LtalT-3V8njr__44cSarv1ac0UmODosxQVDTFjnRDd_J6mf0IPIKtUZu4rIV0geaOvcR06s3yoOrUMWzeynZGabon_QS3cvTLknXbzMc11n2Oku5TTKqa2lQVzuCmTcQkmDuK4qpmLe0VSt4AQTC4uaAIYyoUWgvrZF3lu5I-vuAZEh7UQLKszeqWeVddF48yvfpcQtYzwit29EjyH-uDNFLslIQI3s_xJW2RaYGr5ZoTWe3j5nlWRRlRuNiquVIX9Sc0qQ6krx_yBZaFw6erjBC2oJyr-NIoQ\u0026h=43BxRq4zmlQn9UoNAnKk1iI4MY8XWguTWGxv7PqeJZ0", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "54ec54a6-e734-415d-a64b-83c4e319ea45" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "d1ea894c-e2c3-48fc-9afc-96d8b6cce73f" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "d1ea894c-e2c3-48fc-9afc-96d8b6cce73f" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204844Z:d1ea894c-e2c3-48fc-9afc-96d8b6cce73f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 30675C6549044A4FBE928747ECA45599 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:48:44Z" ], + "Date": [ "Fri, 05 Apr 2024 20:48:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "227" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/uf6atzgmwl/operationResults/0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea\",\"name\":\"0279d5e0-5b6d-4028-9d1b-b4bdcd99b9ea\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "New-AzSelfHelpSolution+[NoContext]+CreateExpanded+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "54ec54a6-e734-415d-a64b-83c4e319ea45" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "6971bfc5-fb6f-4bf5-a168-334cdd577cf8" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "6971bfc5-fb6f-4bf5-a168-334cdd577cf8" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204844Z:6971bfc5-fb6f-4bf5-a168-334cdd577cf8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5A75F25C982E44538B1B3D5B0C43BB19 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:48:44Z" ], + "Date": [ "Fri, 05 Apr 2024 20:48:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/uf6atzgmwl\",\"name\":\"uf6atzgmwl\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Tests.ps1 index 91c78cf12d7e..1f036f0e8cd7 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpSolution.Tests.ps1 @@ -14,18 +14,17 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzSelfHelpSolution')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzSelfHelpSolution' -Tag 'LiveOnly' { +Describe 'New-AzSelfHelpSolution' -Tag 'LiveOnly'{ It 'CreateExpanded' { { $resourceName = RandomString -allChars $false -len 10 $criteria = [ordered]@{ "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" + "value" = "apollo-cognitve-search-custom-skill" } $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } New-AzSelfHelpSolution -Scope $env.scope -ResourceName $resourceName -TriggerCriterion $criteria -Parameter $parameters diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Recording.json new file mode 100644 index 000000000000..6b327314a168 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Recording.json @@ -0,0 +1,40 @@ +{ + "New-AzSelfHelpTroubleshooter+[NoContext]+CreateExpanded+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/7bce8d19-f871-4dcd-be76-3166cf984294?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/7bce8d19-f871-4dcd-be76-3166cf984294?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\n \"parameters\": {\n \"ResourceUri\": \"/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "184" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "41c132eb-197a-4b70-8e8d-9682355d8c32" ], + "x-ms-correlation-request-id": [ "41c132eb-197a-4b70-8e8d-9682355d8c32" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204859Z:41c132eb-197a-4b70-8e8d-9682355d8c32" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 164F753E81B14288A8E21F61152482F9 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:48:58Z" ], + "Date": [ "Fri, 05 Apr 2024 20:48:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/7bce8d19-f871-4dcd-be76-3166cf984294\",\"name\":\"7bce8d19-f871-4dcd-be76-3166cf984294\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"6fb7a952-c11d-474c-aeb7-9b4586d8b914\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Tests.ps1 index 2f2cfbc897e3..721e3442c60b 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/New-AzSelfHelpTroubleshooter.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzSelfHelpTroubleshooter' . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzSelfHelpTroubleshooter' -Tag 'LiveOnly' { +Describe 'New-AzSelfHelpTroubleshooter' -Tag 'LiveOnly'{ It 'CreateExpanded' { { $resourceName = New-Guid $parameters = [ordered]@{ diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Recording.json new file mode 100644 index 000000000000..1a4dcaa141ab --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Recording.json @@ -0,0 +1,84 @@ +{ + "Restart-AzSelfHelpTroubleshooter+[NoContext]+Restart+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/59352e31-265f-4003-9614-8a975afa2853?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/59352e31-265f-4003-9614-8a975afa2853?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\n \"parameters\": {\n \"ResourceUri\": \"/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "184" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "6c75f97f-b812-47e4-8dcb-f57e066c5290" ], + "x-ms-correlation-request-id": [ "6c75f97f-b812-47e4-8dcb-f57e066c5290" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204910Z:6c75f97f-b812-47e4-8dcb-f57e066c5290" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3C2E26E4EF434CDF9112257B937D4D83 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:49:10Z" ], + "Date": [ "Fri, 05 Apr 2024 20:49:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/59352e31-265f-4003-9614-8a975afa2853\",\"name\":\"59352e31-265f-4003-9614-8a975afa2853\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"0c297df7-e563-4a68-8f4b-7d7d829f27e5\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + }, + "Restart-AzSelfHelpTroubleshooter+[NoContext]+Restart+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/troubleshooters/59352e31-265f-4003-9614-8a975afa2853/restart?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/troubleshooters/59352e31-265f-4003-9614-8a975afa2853/restart?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "9b5c16c9-bf0b-4d21-8274-b6f8f885f8d9" ], + "CommandName": [ "Restart-AzSelfHelpTroubleshooter" ], + "FullCommandName": [ "Restart-AzSelfHelpTroubleshooter_Restart" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "d892b05e-e820-4641-8240-17ae17ccd8a5" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "d892b05e-e820-4641-8240-17ae17ccd8a5" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204910Z:d892b05e-e820-4641-8240-17ae17ccd8a5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 948D2E82F48E4D36BD6AF0024DA72495 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:49:10Z" ], + "Date": [ "Fri, 05 Apr 2024 20:49:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "69" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"troubleshooterResourceName\":\"1d04f8b6-3ab2-4d5d-a341-631aa20e8ccd\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Tests.ps1 index d2500edf84d0..f14d0a7774b8 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Restart-AzSelfHelpTroubleshooter.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Restart-AzSelfHelpTroubleshoo . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Restart-AzSelfHelpTroubleshooter' -Tag 'LiveOnly' { +Describe 'Restart-AzSelfHelpTroubleshooter' -Tag 'LiveOnly'{ It 'Restart' { { $resourceName = New-Guid $parameters = [ordered]@{ diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Recording.json new file mode 100644 index 000000000000..efa66d5b005f --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Recording.json @@ -0,0 +1,81 @@ +{ + "Stop-AzSelfHelpTroubleshooter+[NoContext]+End+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/8afb06ca-dc4a-4f6d-9de0-5c97508271bf?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/8afb06ca-dc4a-4f6d-9de0-5c97508271bf?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"solutionId\": \"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\n \"parameters\": {\n \"ResourceUri\": \"/subscriptions/02d59989-f8a9-4b69-9919-1ef51df4eff6\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "184" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "4065321b-3096-42c5-847f-e0c25e7916ac" ], + "x-ms-correlation-request-id": [ "4065321b-3096-42c5-847f-e0c25e7916ac" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204921Z:4065321b-3096-42c5-847f-e0c25e7916ac" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 67584A42EC374DCA9FE3CB344F73FBD6 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:49:21Z" ], + "Date": [ "Fri, 05 Apr 2024 20:49:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "980" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/8afb06ca-dc4a-4f6d-9de0-5c97508271bf\",\"name\":\"8afb06ca-dc4a-4f6d-9de0-5c97508271bf\",\"type\":\"Microsoft.Help/troubleshooters\",\"properties\":{\"provisioningState\":\"AutoContinue\",\"solutionId\":\"e104dbdf-9e14-4c9f-bc78-21ac90382231\",\"steps\":[{\"id\":\"792d1984-b3f7-48eb-8642-6314ab76e04b\",\"title\":\"Intro Step\",\"type\":\"Decision\",\"executionStatus\":\"Success\",\"isLastStep\":false,\"inputs\":[{\"questionId\":\"0\",\"questionType\":\"MultiLineInfoBox\",\"questionContent\":\"{\\\"title\\\":\\\"Connectivity Guided Troubleshooter\\\",\\\"content\\\":\\\"This guided troubleshooter will enable you to self-troubleshoot your Virtual Machine (VM) SSH issues by checking VM health state, network settings, CPU and memory usage, etc. It typically takes between 3 to 5 minutes to complete the flow.\\\"}\",\"questionContentType\":\"Text\"}]}]}}", + "isContentBase64": false + } + }, + "Stop-AzSelfHelpTroubleshooter+[NoContext]+End+$POST+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/8afb06ca-dc4a-4f6d-9de0-5c97508271bf/end?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/troubleshooters/8afb06ca-dc4a-4f6d-9de0-5c97508271bf/end?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "270403c8-0e2a-4cf1-bcb0-4f3a380207c2" ], + "CommandName": [ "Stop-AzSelfHelpTroubleshooter" ], + "FullCommandName": [ "Stop-AzSelfHelpTroubleshooter_End" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "e5acda74-3fd4-46ee-8aed-f081c7bc3236" ], + "x-ms-correlation-request-id": [ "e5acda74-3fd4-46ee-8aed-f081c7bc3236" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204921Z:e5acda74-3fd4-46ee-8aed-f081c7bc3236" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8FF0A6DF075F454BBA4878B7B132FC24 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:49:21Z" ], + "Date": [ "Fri, 05 Apr 2024 20:49:21 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Tests.ps1 index 11291a1fbfce..8b63d5841eef 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Stop-AzSelfHelpTroubleshooter.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Stop-AzSelfHelpTroubleshooter . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Stop-AzSelfHelpTroubleshooter' -Tag 'LiveOnly' { +Describe 'Stop-AzSelfHelpTroubleshooter' -Tag 'LiveOnly'{ It 'End' { { $resourceName = New-Guid $parameters = [ordered]@{ diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Recording.json b/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Recording.json new file mode 100644 index 000000000000..bcc3467ced81 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Recording.json @@ -0,0 +1,258 @@ +{ + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"triggerCriteria\": [\n {\n \"name\": \"SolutionId\",\n \"value\": \"apollo-cognitve-search-custom-skill\"\n }\n ],\n \"parameters\": {\n \"SearchText\": \"Can not Search\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "221" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/b93b51b2-2a87-4824-9b7a-3f52aba850a2?api-version=2024-03-01-preview\u0026t=638479469719356719\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=uN7VPOw8Oe1mqKCWt6MVEs8rKSq53R6ECPGeBW-y4oBtSlcfza7WWH_NRNsiQJrfOoSOgVCF94Cp6g669QxFMf4X_6MmX0QR_3BooPuZ_B2t8kzbVpMfzkbXBtOyxnk1qkK8MpRHdWSPil7e9JgmP2HrLjW9LlMNpHWiokE2Iaxeq3lwJn5t4_xxqQ9q1ijKEKaxQRpZzGWwfYBFm-INifCVGp4k_GMUhUEH1cy7qRy9F0HxrifGS_WMNUQrj9WHmbiFbh3KtDLAdyO4_xL1balVv_HugWKIvI0KFV3wKiw4CLi6femFnxrYDD8eih5G7EGu39_TjkpYKUWlKiKiVQ\u0026h=OfMxMIVn6f1fE7oFCpiVdlyd9bQ3RMbWubX9UzXstQE" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/b93b51b2-2a87-4824-9b7a-3f52aba850a2?api-version=2024-03-01-preview\u0026t=638479469719356719\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=uN7VPOw8Oe1mqKCWt6MVEs8rKSq53R6ECPGeBW-y4oBtSlcfza7WWH_NRNsiQJrfOoSOgVCF94Cp6g669QxFMf4X_6MmX0QR_3BooPuZ_B2t8kzbVpMfzkbXBtOyxnk1qkK8MpRHdWSPil7e9JgmP2HrLjW9LlMNpHWiokE2Iaxeq3lwJn5t4_xxqQ9q1ijKEKaxQRpZzGWwfYBFm-INifCVGp4k_GMUhUEH1cy7qRy9F0HxrifGS_WMNUQrj9WHmbiFbh3KtDLAdyO4_xL1balVv_HugWKIvI0KFV3wKiw4CLi6femFnxrYDD8eih5G7EGu39_TjkpYKUWlKiKiVQ\u0026h=OfMxMIVn6f1fE7oFCpiVdlyd9bQ3RMbWubX9UzXstQE" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "5d2fa9eb-232d-4fdc-83cb-d0c8d3084105" ], + "x-ms-correlation-request-id": [ "5d2fa9eb-232d-4fdc-83cb-d0c8d3084105" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T204931Z:5d2fa9eb-232d-4fdc-83cb-d0c8d3084105" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B52705211C8E4E71AA426977F96AFF94 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:49:31Z" ], + "Date": [ "Fri, 05 Apr 2024 20:49:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew\",\"name\":\"obv4cgl9ew\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/b93b51b2-2a87-4824-9b7a-3f52aba850a2?api-version=2024-03-01-preview\u0026t=638479469719356719\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=uN7VPOw8Oe1mqKCWt6MVEs8rKSq53R6ECPGeBW-y4oBtSlcfza7WWH_NRNsiQJrfOoSOgVCF94Cp6g669QxFMf4X_6MmX0QR_3BooPuZ_B2t8kzbVpMfzkbXBtOyxnk1qkK8MpRHdWSPil7e9JgmP2HrLjW9LlMNpHWiokE2Iaxeq3lwJn5t4_xxqQ9q1ijKEKaxQRpZzGWwfYBFm-INifCVGp4k_GMUhUEH1cy7qRy9F0HxrifGS_WMNUQrj9WHmbiFbh3KtDLAdyO4_xL1balVv_HugWKIvI0KFV3wKiw4CLi6femFnxrYDD8eih5G7EGu39_TjkpYKUWlKiKiVQ\u0026h=OfMxMIVn6f1fE7oFCpiVdlyd9bQ3RMbWubX9UzXstQE+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/b93b51b2-2a87-4824-9b7a-3f52aba850a2?api-version=2024-03-01-preview\u0026t=638479469719356719\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=uN7VPOw8Oe1mqKCWt6MVEs8rKSq53R6ECPGeBW-y4oBtSlcfza7WWH_NRNsiQJrfOoSOgVCF94Cp6g669QxFMf4X_6MmX0QR_3BooPuZ_B2t8kzbVpMfzkbXBtOyxnk1qkK8MpRHdWSPil7e9JgmP2HrLjW9LlMNpHWiokE2Iaxeq3lwJn5t4_xxqQ9q1ijKEKaxQRpZzGWwfYBFm-INifCVGp4k_GMUhUEH1cy7qRy9F0HxrifGS_WMNUQrj9WHmbiFbh3KtDLAdyO4_xL1balVv_HugWKIvI0KFV3wKiw4CLi6femFnxrYDD8eih5G7EGu39_TjkpYKUWlKiKiVQ\u0026h=OfMxMIVn6f1fE7oFCpiVdlyd9bQ3RMbWubX9UzXstQE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "a36e65dd-bd0a-4926-9238-b8654508cbbc" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "198457fd-3138-4903-a4c3-4fc834705faa" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "198457fd-3138-4903-a4c3-4fc834705faa" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T205002Z:198457fd-3138-4903-a4c3-4fc834705faa" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 25A533DB823D405F9BDF2E900D6DCD1C Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:50:02Z" ], + "Date": [ "Fri, 05 Apr 2024 20:50:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "227" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/b93b51b2-2a87-4824-9b7a-3f52aba850a2\",\"name\":\"b93b51b2-2a87-4824-9b7a-3f52aba850a2\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "a36e65dd-bd0a-4926-9238-b8654508cbbc" ], + "CommandName": [ "New-AzSelfHelpSolution" ], + "FullCommandName": [ "New-AzSelfHelpSolution_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "13d13781-3445-44e6-abb3-4e5e8d91118c" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "13d13781-3445-44e6-abb3-4e5e8d91118c" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T205003Z:13d13781-3445-44e6-abb3-4e5e8d91118c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B24BD1EEB7C241FB996175465C7E3426 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:50:02Z" ], + "Date": [ "Fri, 05 Apr 2024 20:50:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew\",\"name\":\"obv4cgl9ew\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview", + "Content": "{\n \"properties\": {\n \"triggerCriteria\": [\n {\n \"name\": \"ReplacementKey\",\n \"value\": \"\\u003c!--85c7bc9e-4405-4e3a-82b0-8c4edc29a04d--\\u003e\"\n }\n ],\n \"parameters\": {\n \"SearchText\": \"Can not Search\"\n }\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "243" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/dd98b222-9594-40e5-a8e2-50530bf635d9?api-version=2024-03-01-preview\u0026t=638479470039819176\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=X5R9yC3MN9fwwE21CTYw4tGU2emHtqQn8QMdWwpzLPhGss4K_mFjgA5cJXIHFTx5qrcRS3BraGWtPfLXvVm27c5d2N72WZGd55P7O72Nl9a0GYdAMldcJddTRjcc3Erec6HIrWMVhc_oku9LqU5oUP5YPc9vDZQCnfFPuV6uYl_4vn2ALoIDzzrRGFl_4iPlSNaKUxcOEZppuDa4Iae7HXcHjk-ctxWh5XUBwWFTMVQUZayqBKOPaxrTG5NX4VJawcLagkgHQvk30YO3SEQgttxPupOEic5Y6WlRvyZqwhjFrsz-iuUGxhYZ8kK0MMkdwt9qzr8lKeiKZvN-pC9teA\u0026h=SLHDjStVpnO7JZ6O1IZ9cD08ziqmLSd-nEPW4DlwqLo" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/dd98b222-9594-40e5-a8e2-50530bf635d9?api-version=2024-03-01-preview\u0026t=638479470039819176\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=X5R9yC3MN9fwwE21CTYw4tGU2emHtqQn8QMdWwpzLPhGss4K_mFjgA5cJXIHFTx5qrcRS3BraGWtPfLXvVm27c5d2N72WZGd55P7O72Nl9a0GYdAMldcJddTRjcc3Erec6HIrWMVhc_oku9LqU5oUP5YPc9vDZQCnfFPuV6uYl_4vn2ALoIDzzrRGFl_4iPlSNaKUxcOEZppuDa4Iae7HXcHjk-ctxWh5XUBwWFTMVQUZayqBKOPaxrTG5NX4VJawcLagkgHQvk30YO3SEQgttxPupOEic5Y6WlRvyZqwhjFrsz-iuUGxhYZ8kK0MMkdwt9qzr8lKeiKZvN-pC9teA\u0026h=SLHDjStVpnO7JZ6O1IZ9cD08ziqmLSd-nEPW4DlwqLo" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "684eb5c3-5f70-4b26-89b7-67860c7c465c" ], + "x-ms-correlation-request-id": [ "684eb5c3-5f70-4b26-89b7-67860c7c465c" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T205003Z:684eb5c3-5f70-4b26-89b7-67860c7c465c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 27A8193CA94D4EC092904703BF4BAB5E Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:50:03Z" ], + "Date": [ "Fri, 05 Apr 2024 20:50:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3415" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew\",\"name\":\"obv4cgl9ew\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"diagnostics\":[],\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}],\"metricsBasedCharts\":[]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/dd98b222-9594-40e5-a8e2-50530bf635d9?api-version=2024-03-01-preview\u0026t=638479470039819176\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=X5R9yC3MN9fwwE21CTYw4tGU2emHtqQn8QMdWwpzLPhGss4K_mFjgA5cJXIHFTx5qrcRS3BraGWtPfLXvVm27c5d2N72WZGd55P7O72Nl9a0GYdAMldcJddTRjcc3Erec6HIrWMVhc_oku9LqU5oUP5YPc9vDZQCnfFPuV6uYl_4vn2ALoIDzzrRGFl_4iPlSNaKUxcOEZppuDa4Iae7HXcHjk-ctxWh5XUBwWFTMVQUZayqBKOPaxrTG5NX4VJawcLagkgHQvk30YO3SEQgttxPupOEic5Y6WlRvyZqwhjFrsz-iuUGxhYZ8kK0MMkdwt9qzr8lKeiKZvN-pC9teA\u0026h=SLHDjStVpnO7JZ6O1IZ9cD08ziqmLSd-nEPW4DlwqLo+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/dd98b222-9594-40e5-a8e2-50530bf635d9?api-version=2024-03-01-preview\u0026t=638479470039819176\u0026c=MIIHHjCCBgagAwIBAgITOgKYMsjF2b7LauhN0AAEApgyyDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwMjAxMTIyNjQyWhcNMjUwMTI2MTIyNjQyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMc6LeWeOAaTapwYz_M49L1VnORab6YTpwLCwmxVWB4gwKTMBTmZE4saFVHP8ucZaaSOGOKBWpswbI7pIUIor6tJZtCkG43ZSGvPP8k8R2tzhLBkAqnyiF7I2NPVowqOCrUhoTfTw5_Rp1bjqTvjRnTtPsbSQX6rOcZ6PLNv5kPzxHtubphb-8oLxSX0xoAjYbiUfoO-Gnf1qVOFFWTgyWFpk17LRz8h04unm1y8YKkpfjcQ2bRNL5Gmr4zX_eLNFtC-x2zlYTK7F84MnG0jRyjImNx0jLTSY0Ug2kBcjC9NtGcrVIgwMRo8mtAqJbl-t1oT9_g6iTDwGRm2XP9UklUCAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBTzsBP1TbO4yLR6cLGeWQ2ro5HzZzAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD4mRGDGmDi9qTaK0C1VvqM3Z09ZRygYqrV4phOqa2GNdfahu_bsZlimgC1O_Lx6hJwrIAXuIIv1B4BpMW4aOYUANoElTlzJM15ai4ijNhOYktD-Fu1wR6tgp8V9Leq_iSbNal00zg9ePy2McmeIsMUDUd4CW5jYRf8XjPjclj311ODC-7XxRexpD_XMQkp_l6rcl0pApBrzRVsqAYrNnZHgOa1174EzcdTgivQjSW3pcHnG_byS7heC4Sj8rCGmef456Oo7W81yYY23Tyg7uAfq3iJuOEdrmNNpDQDPEVmncEOYezS6m1DWB8mLoNORo_vpAR9MiyFBNUDF2YK9KQo\u0026s=X5R9yC3MN9fwwE21CTYw4tGU2emHtqQn8QMdWwpzLPhGss4K_mFjgA5cJXIHFTx5qrcRS3BraGWtPfLXvVm27c5d2N72WZGd55P7O72Nl9a0GYdAMldcJddTRjcc3Erec6HIrWMVhc_oku9LqU5oUP5YPc9vDZQCnfFPuV6uYl_4vn2ALoIDzzrRGFl_4iPlSNaKUxcOEZppuDa4Iae7HXcHjk-ctxWh5XUBwWFTMVQUZayqBKOPaxrTG5NX4VJawcLagkgHQvk30YO3SEQgttxPupOEic5Y6WlRvyZqwhjFrsz-iuUGxhYZ8kK0MMkdwt9qzr8lKeiKZvN-pC9teA\u0026h=SLHDjStVpnO7JZ6O1IZ9cD08ziqmLSd-nEPW4DlwqLo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "41" ], + "x-ms-client-request-id": [ "1e4af8e1-5544-46d6-a05d-b6dd79a10fd4" ], + "CommandName": [ "Update-AzSelfHelpSolution" ], + "FullCommandName": [ "Update-AzSelfHelpSolution_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "7dc5d2d3-7aa7-4708-9972-9a0ffe030716" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "7dc5d2d3-7aa7-4708-9972-9a0ffe030716" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T205035Z:7dc5d2d3-7aa7-4708-9972-9a0ffe030716" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8532DBEAFC214CE7B9B1F42618C4125A Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:50:34Z" ], + "Date": [ "Fri, 05 Apr 2024 20:50:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "227" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/providers/Microsoft.Help/Solutions/obv4cgl9ew/operationResults/dd98b222-9594-40e5-a8e2-50530bf635d9\",\"name\":\"dd98b222-9594-40e5-a8e2-50530bf635d9\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "Update-AzSelfHelpSolution+[NoContext]+UpdateExpanded+$GET+https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com//subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew?api-version=2024-03-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "1e4af8e1-5544-46d6-a05d-b6dd79a10fd4" ], + "CommandName": [ "Update-AzSelfHelpSolution" ], + "FullCommandName": [ "Update-AzSelfHelpSolution_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.SelfHelp/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-request-id": [ "5497beaa-7e82-4a0e-a082-6fb151c465ca" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "499" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-correlation-request-id": [ "5497beaa-7e82-4a0e-a082-6fb151c465ca" ], + "x-ms-routing-request-id": [ "EASTUS2:20240405T205036Z:5497beaa-7e82-4a0e-a082-6fb151c465ca" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1B93B483B110431E803BA84460B748C4 Ref B: BN1AA2051015017 Ref C: 2024-04-05T20:50:35Z" ], + "Date": [ "Fri, 05 Apr 2024 20:50:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3415" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp/providers/Microsoft.Help/solutions/obv4cgl9ew\",\"name\":\"obv4cgl9ew\",\"type\":\"Microsoft.Help/Solutions\",\"properties\":{\"title\":\"Issue getting a custom skill to work\",\"content\":\"\u003ch2\u003eResolve issues with a custom skill not working with Cognitive Search\u003c/h2\u003e\\n\u003cp\u003eBuilding a custom skill gives you a way to insert transformations unique to your content. A custom skill executes independently, applying whatever enrichment step you require. For example, you could build custom classification models to differentiate business and financial contracts and documents, or add a speech recognition skill to reach deeper into audio files for relevant content.\u003c/p\u003e\\n\u003cp\u003eIf you\u0027re experiencing issues with a custom skill not working with Cognitive Search, use the following guidance to help resolve your issues.\u003c/p\u003e\\n\u003ch3\u003eTroubleshooting steps\u003c/h3\u003e\\n\u003cp\u003eIf you are having trouble with a custom skill, ensure that:\u003c/p\u003e\\n\u003col\u003e\\n\u003cli\u003eYour skill works with a REST client.\u003c/li\u003e\\n\u003cli\u003eThe custom skill meets the \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003ecustom skill interface guidelines\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eAll indexer run errors and warnings are resolved.\u003c/li\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-create-custom-skill-example\\\"\u003eThe skillset definition of the custom skill is valid\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eThe input data matches the schema of your target index. For more information, see \u003ca href=\\\"https://docs.microsoft.com/azure/search/search-indexer-field-mappings\\\"\u003eField mappings and transformations using Azure Cognitive Search indexers\u003c/a\u003e.\u003c/li\u003e\\n\u003cli\u003eYou use \u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-debug-session\\\"\u003edebug sessions\u003c/a\u003e to identify and resolve errors, validate changes, and push changes to a production skillset in the AI enrichment pipeline.\u003c/li\u003e\\n\u003c/ol\u003e\\n\u003ch3\u003eResources\u003c/h3\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003ca href=\\\"https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface\\\"\u003eHow to add a custom skill to a cognitive search pipeline\u003c/a\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003ch3\u003eRelevant results from the web\u003c/h3\u003e\\n\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\\n\",\"replacementMaps\":{\"diagnostics\":[],\"webResults\":[{\"searchResults\":[{\"solutionId\":\"MicrosoftQnA_667871\",\"content\":\"...search re-index 3. Validated the the search crawl log from admin Centre 4. Its been 48 hours now after user get added to the site but the crawl is still running...\",\"title\":\"Search Issue\",\"confidence\":\"High\",\"source\":\"MicrosoftQnA\",\"resultType\":\"Community\",\"rank\":1,\"link\":\"https://learn.microsoft.com/answers/questions/667871/\"},{\"solutionId\":\"articles|search|semantic-search-overview.md\",\"content\":\"...search query is a question, and answers are requested, the response will include a text passage that best answers the question, as expressed by the search query.\\n:::image type=\\\"content\\\" source=\\\"media...\",\"title\":\"What is semantic ranking?\",\"confidence\":\"High\",\"source\":\"\",\"resultType\":\"Documentation\",\"rank\":1,\"link\":\"https://docs.microsoft.com/en-us/azure/search/semantic-search-overview#semantic-search-architecture\"}],\"replacementKey\":\"\u003c!--7a365ebd-fbe2-4ff6-8c3c-cfaf82ca9f7f--\u003e\"}],\"metricsBasedCharts\":[]},\"sections\":[],\"solutionId\":\"apollo-cognitve-search-custom-skill\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Tests.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Tests.ps1 index bdec1ee1cc4b..aa669b61701d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Tests.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/Update-AzSelfHelpSolution.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSelfHelpSolution')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Update-AzSelfHelpSolution' -Tag 'LiveOnly' { +Describe 'Update-AzSelfHelpSolution' -Tag 'LiveOnly'{ It 'UpdateExpanded' { { $resourceName = RandomString -allChars $false -len 10 @@ -24,13 +24,12 @@ Describe 'Update-AzSelfHelpSolution' -Tag 'LiveOnly' { } $criteria = [ordered]@{ "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" + "value" = "apollo-cognitve-search-custom-skill" } $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" - } + "SearchText" = "Can not Search" + } New-AzSelfHelpSolution -Scope $env.scope -ResourceName $resourceName -TriggerCriterion $criteria -Parameter $parameters Update-AzSelfHelpSolution -Scope $env.scope -ResourceName $resourceName -TriggerCriterion $criteriaReplacementKey -Parameter $parameters } | Should -Not -Throw diff --git a/src/SelfHelp/SelfHelp.Autorest/test/env.json b/src/SelfHelp/SelfHelp.Autorest/test/env.json index 58b815e8c60d..81aa01a8e211 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/env.json +++ b/src/SelfHelp/SelfHelp.Autorest/test/env.json @@ -1,7 +1,7 @@ { + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "resourceGroup": "sm1dxne74h", "SubscriptionId": "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba", - "scope": "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/l1ca7pfg5b/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp", - "location": "eastus", - "resourceGroup": "l1ca7pfg5b", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" + "scope": "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/sm1dxne74h/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp", + "location": "eastus" } diff --git a/src/SelfHelp/SelfHelp.Autorest/test/loadEnv.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/loadEnv.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/loadEnv.ps1 @@ -25,5 +25,5 @@ if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { $env = @{} if (Test-Path -Path $envFilePath) { $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json - $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} } \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.Autorest/test/localEnv.json b/src/SelfHelp/SelfHelp.Autorest/test/localEnv.json index e532e53686e5..c799182c222d 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/localEnv.json +++ b/src/SelfHelp/SelfHelp.Autorest/test/localEnv.json @@ -1,7 +1,7 @@ { - "scope": "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/fc610as2rw/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp", - "SubscriptionId": "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "resourceGroup": "feprs3t65o", "location": "eastus", - "resourceGroup": "fc610as2rw" + "scope": "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourcegroups/feprs3t65o/providers/Microsoft.Storage/storageAccounts/teststorageforselfhelp", + "SubscriptionId": "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" } diff --git a/src/SelfHelp/SelfHelp.Autorest/test/utils.ps1 b/src/SelfHelp/SelfHelp.Autorest/test/utils.ps1 index a48510f2b2f3..f6e29c85d329 100644 --- a/src/SelfHelp/SelfHelp.Autorest/test/utils.ps1 +++ b/src/SelfHelp/SelfHelp.Autorest/test/utils.ps1 @@ -40,6 +40,9 @@ if ($UsePreviousConfigForRecord) { # example: $val = $env.AddWithCache('key', $val, $true) $env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' function setupEnv() { + + Install-Module -Name Az.Resources -AllowClobber -Scope CurrentUser -Force + # Preload subscriptionId and tenant from context, which will be used in test # as default. You could change them if needed. $env.SubscriptionId = (Get-AzContext).Subscription.Id diff --git a/src/SelfHelp/SelfHelp.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/SelfHelp/SelfHelp.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 b/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 index 70b23da8aef4..5ee62a1ecf0f 100644 --- a/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 +++ b/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/16/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'SelfHelp.Autorest/bin/Az.SelfHelp.private.dll' @@ -70,10 +70,14 @@ NestedModules = @('SelfHelp.Autorest/Az.SelfHelp.psm1') # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Get-AzSelfHelpDiagnostic', 'Get-AzSelfHelpDiscoverySolution', - 'Get-AzSelfHelpSolution', 'Get-AzSelfHelpTroubleshooter', + 'Get-AzSelfHelpSimplifiedSolution', 'Get-AzSelfHelpSolution', + 'Get-AzSelfHelpSolutionSelfHelp', 'Get-AzSelfHelpTroubleshooter', 'Invoke-AzSelfHelpCheckNameAvailability', 'Invoke-AzSelfHelpContinueTroubleshooter', - 'New-AzSelfHelpDiagnostic', 'New-AzSelfHelpSolution', + 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope', + 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope', + 'Invoke-AzSelfHelpWarmSolutionUp', 'New-AzSelfHelpDiagnostic', + 'New-AzSelfHelpSimplifiedSolution', 'New-AzSelfHelpSolution', 'New-AzSelfHelpTroubleshooter', 'Restart-AzSelfHelpTroubleshooter', 'Stop-AzSelfHelpTroubleshooter', 'Update-AzSelfHelpSolution' diff --git a/src/SelfHelp/SelfHelp/ChangeLog.md b/src/SelfHelp/SelfHelp/ChangeLog.md index a14fb76d5547..bd20e0ba5355 100644 --- a/src/SelfHelp/SelfHelp/ChangeLog.md +++ b/src/SelfHelp/SelfHelp/ChangeLog.md @@ -18,6 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release +* Added support for Discovery NLP API at Subscription and Tenant levels. +* Added support for SelfHelp API and Discovery API at Tenant level. +* Added support for Simplified Solutions API. ## Version 0.1.1 * Added support for discovery API as the first point of entry in Help RP. diff --git a/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md b/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md index 564e42149464..0cf68c4150af 100644 --- a/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md +++ b/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md @@ -16,11 +16,18 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating ### [Get-AzSelfHelpDiscoverySolution](Get-AzSelfHelpDiscoverySolution.md) Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL \
\
Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics and Solutions API. + +### [Get-AzSelfHelpSimplifiedSolution](Get-AzSelfHelpSimplifiedSolution.md) +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. ### [Get-AzSelfHelpSolution](Get-AzSelfHelpSolution.md) Get the solution using the applicable solutionResourceName while creating the solution. +### [Get-AzSelfHelpSolutionSelfHelp](Get-AzSelfHelpSolutionSelfHelp.md) +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + ### [Get-AzSelfHelpTroubleshooter](Get-AzSelfHelpTroubleshooter.md) Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API. @@ -29,34 +36,49 @@ This API requires the Troubleshooter resource name that was created using the Cr This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions ### [Invoke-AzSelfHelpContinueTroubleshooter](Invoke-AzSelfHelpContinueTroubleshooter.md) -Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API. +### [Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope](Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md) +Solution discovery using natural language processing. + +### [Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope](Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md) +Solution discovery using natural language processing. + +### [Invoke-AzSelfHelpWarmSolutionUp](Invoke-AzSelfHelpWarmSolutionUp.md) +Warm up the solution resource by preloading asynchronous diagnostics results into cache + ### [New-AzSelfHelpDiagnostic](New-AzSelfHelpDiagnostic.md) Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -\
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -\
\
\Note: \ requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. + +### [New-AzSelfHelpSimplifiedSolution](New-AzSelfHelpSimplifiedSolution.md) +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. +\
### [New-AzSelfHelpSolution](New-AzSelfHelpSolution.md) -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.\
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. -Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. -In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more 'requiredParameters' that are required to execute the individual solution component. +In the absence of the 'requiredParameters' it is likely that some of the solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. -‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of Solutions API. \
2. -‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. -‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters +'requiredParameters' from the Solutions response is the same as ' additionalParameters' in the request for diagnostics \
3. +'requiredParameters' from the Solutions response is the same as 'properties.parameters' in the request for Troubleshooters ### [New-AzSelfHelpTroubleshooter](New-AzSelfHelpTroubleshooter.md) -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -\
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -\
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’ \
After creating the Troubleshooter instance, the following APIs can be used:\
CONTINUE API: to move to the next step in the flow \
GET API: to identify the next step after executing the CONTINUE API. - \
\
\Note:\ ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. ### [Restart-AzSelfHelpTroubleshooter](Restart-AzSelfHelpTroubleshooter.md) Restarts the troubleshooter API using applicable troubleshooter resource name as the input.\
It returns new resource name which should be used in subsequent request. diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md index 183ae0bc5b9b..f7113ab16c88 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic schema: 2.0.0 @@ -14,13 +14,14 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating ### Get (Default) ``` -Get-AzSelfHelpDiagnostic -Scope -SResourceName [-DefaultProfile ] - [] +Get-AzSelfHelpDiagnostic -SResourceName -Scope [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzSelfHelpDiagnostic -InputObject [-DefaultProfile ] [] +Get-AzSelfHelpDiagnostic -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -30,7 +31,7 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating ### 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 +Get-AzSelfHelpDiagnostic -Scope "subscriptions/6bded6d5-a6df-44e1-96d3-bf71f6f5f8ba/resourceGroups/test-rgName/providers/Microsoft.KeyVault/vaults/testKeyVault" -SResourceName ab-test-983 ``` ```output @@ -75,8 +76,23 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -114,9 +130,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md index c5d407db7c5e..b0e550935f8b 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution schema: 2.0.0 @@ -9,24 +9,24 @@ schema: 2.0.0 ## SYNOPSIS Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL \
\
Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics and Solutions API. ## SYNTAX ``` -Get-AzSelfHelpDiscoverySolution -Scope [-Filter ] [-Skiptoken ] - [-DefaultProfile ] [] +Get-AzSelfHelpDiscoverySolution [-Filter ] [-Skiptoken ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.\
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. -We will do our best to return the most effective solutions based on the type of inputs, in the request URL \
\
Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. +\
\
Required Input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) \
Optional input: resourceUri OR resource Type \
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics and Solutions API. ## EXAMPLES ### 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" -Filter "problemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'" +Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" ``` ```output @@ -34,7 +34,7 @@ Name SystemDataCreatedAt SystemDataCreatedBy Sys ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- -a5db90c3-f147-bce6-83b0-ab5e0aeca1f0 +a5db90c3-f147-bce6-83b0-ab5e0aeca1f0 ``` Get Solution Metadata by resource id @@ -58,9 +58,9 @@ Accept wildcard characters: False ``` ### -Filter -'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. +'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. -The filter supports only 'and', 'or' and 'eq' operators. +The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' ```yaml @@ -75,15 +75,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: System.String +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: +Aliases: proga -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -112,9 +112,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..2a8d12566bd3 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,139 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution +schema: 2.0.0 +--- + +# Get-AzSelfHelpSimplifiedSolution + +## SYNOPSIS +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpSimplifiedSolution -SResourceName -Scope [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpSimplifiedSolution -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## EXAMPLES + +### Example 1: Get Simplified Solutions +```powershell +$resourceName = "sampleRName" + +Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName aits-data-inestion +``` + +Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Simplified Solutions Resource Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SimplifiedSolutionsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md index 12f01418e252..7d05cce4f93c 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution schema: 2.0.0 @@ -15,12 +15,13 @@ Get the solution using the applicable solutionResourceName while creating the so ### Get (Default) ``` Get-AzSelfHelpSolution -ResourceName -Scope [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzSelfHelpSolution -InputObject [-DefaultProfile ] [] +Get-AzSelfHelpSolution -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -30,13 +31,13 @@ Get the solution using the applicable solutionResourceName while creating the so ### Example 1: Get-AzSelfHelpSolution by resource id ```powershell -Get-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/testkv/testDB +Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRG +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Get SelfHelp Solution by resource id @@ -75,6 +76,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceName Solution resource Name. @@ -91,7 +107,7 @@ Accept wildcard characters: False ``` ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -114,9 +130,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md new file mode 100644 index 000000000000..f50bbd6874a4 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md @@ -0,0 +1,126 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp +schema: 2.0.0 +--- + +# Get-AzSelfHelpSolutionSelfHelp + +## SYNOPSIS +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + +## SYNTAX + +### Get (Default) +``` +Get-AzSelfHelpSolutionSelfHelp -SolutionId [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzSelfHelpSolutionSelfHelp -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Finds and Executes a Self Help Solution based on the Solution Id. +These are static self help content to help users troubleshoot their issues. + +## EXAMPLES + +### Example 1: Get Self Help Solutions for a given solutionId +```powershell +Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138843d5d5" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +apollo-48996ff7-002f-47c1-85b2-df138843d5d5 +``` + +Gets Self Help Solutions for a given solutionId. +Self Help Solutions consist of rich instructional video tutorials, links and guides to public documentation related to a specific problem that enables users to troubleshoot Azure issues. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionId +SolutionId is a unique id to identify a solution. +You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md index 7aab6ac460c6..674df84d50c6 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter schema: 2.0.0 @@ -15,13 +15,14 @@ This API requires the Troubleshooter resource name that was created using the Cr ### Get (Default) ``` -Get-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [] +Get-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -39,7 +40,6 @@ Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- 02d59989-f8a9-4b69-9919-1ef51df4eff6 - ``` Get Azure SelfHelp Troubleshooter by name. @@ -94,8 +94,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -118,9 +133,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md index a393023d67ed..3e75b0303798 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability schema: 2.0.0 @@ -15,27 +15,27 @@ This API is used to check the uniqueness of a resource name used for a diagnosti ### PostExpanded (Default) ``` Invoke-AzSelfHelpCheckNameAvailability -Scope [-Name ] [-Type ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Post ``` Invoke-AzSelfHelpCheckNameAvailability -Scope - -CheckNameAvailabilityRequest [-DefaultProfile ] [-Confirm] - [-WhatIf] [] + -CheckNameAvailabilityRequest [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostViaIdentityExpanded ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject - -CheckNameAvailabilityRequest [-DefaultProfile ] [-Confirm] - [-WhatIf] [] +Invoke-AzSelfHelpCheckNameAvailability -InputObject [-Name ] [-Type ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` -### PostViaIdentityExpanded +### PostViaIdentity ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject [-Name ] [-Type ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Invoke-AzSelfHelpCheckNameAvailability -InputObject + -CheckNameAvailabilityRequest [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,10 +47,10 @@ This API is used to check the uniqueness of a resource name used for a diagnosti ```powershell $CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ "name" ="helloworld" - “type” = “solutions” + "type" = "solutions" } - Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST + Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST ``` ```output @@ -58,7 +58,7 @@ Message NameAvailable Reason ------- ------------- ------ - True + True ``` Checks if resource name is avilabale/unique for the scope or not @@ -103,7 +103,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Parameter Sets: PostViaIdentityExpanded, PostViaIdentity Aliases: Required: True @@ -128,12 +128,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String -Parameter Sets: Post, PostExpanded +Parameter Sets: PostExpanded, Post Aliases: Required: True @@ -200,9 +215,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ICheckNameAvailabilityResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md index e34783762c55..97f02537b794 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter schema: 2.0.0 @@ -8,7 +8,7 @@ schema: 2.0.0 # Invoke-AzSelfHelpContinueTroubleshooter ## SYNOPSIS -Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API. @@ -18,32 +18,32 @@ This API is used after the Troubleshooter has been created using the Create API. ``` Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName [-Response ] [-StepId ] [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Continue ``` Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName - -ContinueRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] - [] + -ContinueRequestBody [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` -### ContinueViaIdentity +### ContinueViaIdentityExpanded ``` Invoke-AzSelfHelpContinueTroubleshooter -InputObject - -ContinueRequestBody [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] - [] + [-Response ] [-StepId ] [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` -### ContinueViaIdentityExpanded +### ContinueViaIdentity ``` Invoke-AzSelfHelpContinueTroubleshooter -InputObject - [-Response ] [-StepId ] [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + -ContinueRequestBody [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. +Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API. @@ -55,7 +55,7 @@ $continueRequest = [ordered]@{ "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" } -Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest +Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest ``` ```output @@ -73,7 +73,7 @@ Troubleshooter ContinueRequest body. To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody Parameter Sets: Continue, ContinueViaIdentity Aliases: @@ -106,7 +106,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: ContinueViaIdentity, ContinueViaIdentityExpanded +Parameter Sets: ContinueViaIdentityExpanded, ContinueViaIdentity Aliases: Required: True @@ -131,12 +131,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Response . To construct, see NOTES section for RESPONSE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResponse[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Parameter Sets: ContinueExpanded, ContinueViaIdentityExpanded Aliases: @@ -148,11 +163,11 @@ Accept wildcard characters: False ``` ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String -Parameter Sets: Continue, ContinueExpanded +Parameter Sets: ContinueExpanded, Continue Aliases: Required: True @@ -182,7 +197,7 @@ Troubleshooter resource Name. ```yaml Type: System.String -Parameter Sets: Continue, ContinueExpanded +Parameter Sets: ContinueExpanded, Continue Aliases: Required: True @@ -228,7 +243,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IContinueRequestBody +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -239,4 +254,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md new file mode 100644 index 000000000000..b012586d1fd6 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md @@ -0,0 +1,247 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope + +## SYNOPSIS +Solution discovery using natural language processing. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId ] [-AdditionalContext ] + [-IssueSummary ] [-ResourceId ] [-ServiceId ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### Post +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId ] + -DiscoverSolutionRequest [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject + [-AdditionalContext ] [-IssueSummary ] [-ResourceId ] [-ServiceId ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### PostViaIdentity +``` +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject + -DiscoverSolutionRequest [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Solution discovery using natural language processing. + +## EXAMPLES + +### Example 1: Discover Solution using natural language at subscription scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. + +## PARAMETERS + +### -AdditionalContext +Additional information in the form of a string. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiscoverSolutionRequest +Discover NLP request. +To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Parameter Sets: Post, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: PostViaIdentityExpanded, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IssueSummary +Describe the issue with the affected resource. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Provide resourceId of affected resource + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceId +Service Classification id for the resource. +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +```yaml +Type: System.String +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, Post +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md new file mode 100644 index 000000000000..f31780a056a5 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md @@ -0,0 +1,198 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope + +## SYNOPSIS +Solution discovery using natural language processing. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope [-AdditionalContext ] [-IssueSummary ] + [-ResourceId ] [-ServiceId ] [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### Post +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -DiscoverSolutionRequest + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Solution discovery using natural language processing. + +## EXAMPLES + +### Example 1: Discover Solution using natural language at tenant scope +```powershell +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" +``` + +```output +[No output] +``` + +Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + +## PARAMETERS + +### -AdditionalContext +Additional information in the form of a string. + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiscoverSolutionRequest +Discover NLP request. +To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Parameter Sets: Post +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IssueSummary +Describe the issue with the affected resource. + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Provide resourceId of affected resource + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceId +Service Classification id for the resource. +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md new file mode 100644 index 000000000000..389b1675ff79 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md @@ -0,0 +1,234 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup +schema: 2.0.0 +--- + +# Invoke-AzSelfHelpWarmSolutionUp + +## SYNOPSIS +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## SYNTAX + +### WarmExpanded (Default) +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName [-Parameter ] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### Warm +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName + -SolutionWarmUpRequestBody [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### WarmViaIdentityExpanded +``` +Invoke-AzSelfHelpWarmSolutionUp -InputObject [-Parameter ] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### WarmViaIdentity +``` +Invoke-AzSelfHelpWarmSolutionUp -InputObject + -SolutionWarmUpRequestBody [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## EXAMPLES + +### Example 1: Warm up the solution resource +```powershell +$resourceName = "sampleRName" +$parameters = [ordered]@{ + "ProductId" = "13491" +} +Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters +``` + +```output +[No output] +``` + +Warm up the solution resource by preloading asynchronous diagnostics results into cache + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: WarmViaIdentityExpanded, WarmViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Parameter +Dictionary of \ + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: WarmExpanded, WarmViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: WarmExpanded, Warm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionResourceName +Solution resource Name. + +```yaml +Type: System.String +Parameter Sets: WarmExpanded, Warm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionWarmUpRequestBody +Solution WarmUpRequest body +To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +Parameter Sets: Warm, WarmViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md index 1b3c79332f61..fa394440a63c 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic schema: 2.0.0 @@ -9,23 +9,19 @@ schema: 2.0.0 ## SYNOPSIS Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -\
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -\
\
\Note: \ requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. ## SYNTAX ``` -New-AzSelfHelpDiagnostic -Scope -SResourceName [-GlobalParameter ] - [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] +New-AzSelfHelpDiagnostic -SResourceName -Scope [-GlobalParameter ] + [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. -\
Diagnostics tells you precisely the root cause of the issue and the steps to address it. -You can get diagnostics once you discover the relevant solution for your Azure issue. -\
\
\Note: \ requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. +\
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. ## EXAMPLES @@ -79,7 +75,7 @@ Accept wildcard characters: False ``` ### -GlobalParameter -Global parameters that can be passed to all solutionIds. +Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results ```yaml Type: System.Collections.Hashtable @@ -98,7 +94,7 @@ SolutionIds that are needed to be invoked. To construct, see NOTES section for INSIGHT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticInvocation[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Parameter Sets: (All) Aliases: @@ -124,8 +120,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -192,9 +203,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md new file mode 100644 index 000000000000..62cdd0bacd78 --- /dev/null +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md @@ -0,0 +1,218 @@ +--- +external help file: Az.SelfHelp-help.xml +Module Name: Az.SelfHelp +online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution +schema: 2.0.0 +--- + +# New-AzSelfHelpSimplifiedSolution + +## SYNOPSIS +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. +\
+ +## SYNTAX + +``` +New-AzSelfHelpSimplifiedSolution -SResourceName -Scope [-Parameter ] + [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. +\
\
\Note:\ \
1. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. +\
+ +## EXAMPLES + +### Example 1: Create a new simplified solution for a resource +```powershell +$resourceName = "sampleRName" +$solutionId = "9004345-7759" +$parameters = [ordered]@{ + + "SearchText" = "Billing" +} +New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +sampleRName +``` + +Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Client input parameters to run Simplified Solutions + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SolutionId +Solution Id to identify single Simplified Solution. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SResourceName +Simplified Solutions Resource Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SimplifiedSolutionsResourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + +## NOTES + +## RELATED LINKS diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md index eb3e0a6e1a09..55b8c91213f1 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution schema: 2.0.0 @@ -8,58 +8,59 @@ schema: 2.0.0 # New-AzSelfHelpSolution ## SYNOPSIS -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.\
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. -Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. -In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more 'requiredParameters' that are required to execute the individual solution component. +In the absence of the 'requiredParameters' it is likely that some of the solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. -‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of Solutions API. \
2. -‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. -‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters +'requiredParameters' from the Solutions response is the same as ' additionalParameters' in the request for diagnostics \
3. +'requiredParameters' from the Solutions response is the same as 'properties.parameters' in the request for Troubleshooters ## SYNTAX ``` -New-AzSelfHelpSolution -ResourceName -Scope [-Content ] [-Parameter ] - [-ProvisioningState ] [-ReplacementMapDiagnostic ] - [-ReplacementMapMetricsBasedChart ] - [-ReplacementMapTroubleshooter ] [-ReplacementMapVideo ] - [-ReplacementMapVideoGroup ] [-ReplacementMapWebResult ] [-Section ] - [-SolutionId ] [-Title ] [-TriggerCriterion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +New-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates a solution for the specific Azure resource or subscription using the triggering criteria ‘solutionId and requiredInputs’ from discovery solutions.\
Solutions are a rich, insightful and a centralized self help experience that brings all the relevant content to troubleshoot an Azure issue into a unified experience. -Solutions include the following components : Text, Diagnostics , Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with capabilities to support new solutions types in the future. -Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. -In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response. +Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +\
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. +These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. +All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. +Each solution type may require one or more 'requiredParameters' that are required to execute the individual solution component. +In the absence of the 'requiredParameters' it is likely that some of the solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. -‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API. +'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of Solutions API. \
2. -‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics \
3. -‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters +'requiredParameters' from the Solutions response is the same as ' additionalParameters' in the request for diagnostics \
3. +'requiredParameters' from the Solutions response is the same as 'properties.parameters' in the request for Troubleshooters ## EXAMPLES ### Example 1: Create New SelfHelp Solution ```powershell -$criteria = [ordered]@{ - "name" ="SolutionId" - "value" = "keyvault-lostdeletedkeys-apollo-solution" -} -$parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" -} -New-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions//resourceGroups/testRG/providers/Microsoft.KeyVault/kv/testDB -Parameter $parameters -TriggerCriterion $criteria +$criteria = [ordered]@{ + "name" ="SolutionId" + "value" = "apollo-cognitve-search-custom-skill" +} + +$parameters = [ordered]@{ + "SearchText" = "Can not Search" +} + +New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRg +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Creates a SelfHelp Solution for a resource. @@ -81,21 +82,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Content -The HTML content that needs to be rendered and shown to customer. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -142,109 +128,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProvisioningState -Status of solution provisioning. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapDiagnostic -Solution diagnostics results. -To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapMetricsBasedChart -Solution metrics based charts -To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapTroubleshooter -Solutions Troubleshooters -To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapVideo -Video solutions, which have the power to engage the customer by stimulating their senses -To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapVideoGroup -Group of Videos -To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapWebResult -Solution AzureKB results -To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] -Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -269,7 +159,7 @@ Accept wildcard characters: False ``` ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -283,58 +173,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Section -List of section object. -To construct, see NOTES section for SECTION properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SolutionId -Solution Id to identify single solution. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Title -The title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -TriggerCriterion Solution request trigger criteria To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] Parameter Sets: (All) Aliases: @@ -383,9 +227,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md index c7fd49af62df..61982ad48dcf 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter schema: 2.0.0 @@ -8,27 +8,25 @@ schema: 2.0.0 # New-AzSelfHelpTroubleshooter ## SYNOPSIS -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -\
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -\
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’ \
After creating the Troubleshooter instance, the following APIs can be used:\
CONTINUE API: to move to the next step in the flow \
GET API: to identify the next step after executing the CONTINUE API. - \
\
\Note:\ ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. ## SYNTAX ``` New-AzSelfHelpTroubleshooter -Name -Scope [-Parameter ] [-SolutionId ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. -\
Troubleshooters are step-by-step interactive guidance that scope the problem by collecting additional inputs from you in each stage while troubleshooting an Azure issue. -You will be guided down decision tree style workflow and the best possible solution will be presented at the end of the workflow. -\
Create API creates the Troubleshooter API using ‘parameters’ and ‘solutionId’ \
After creating the Troubleshooter instance, the following APIs can be used:\
CONTINUE API: to move to the next step in the flow \
GET API: to identify the next step after executing the CONTINUE API. - \
\
\Note:\ ‘requiredParameters’ from solutions response must be passed via ‘properties. -parameters’ in the request body of Troubleshooters API. +Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +\
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. +Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. +These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. +Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. ## EXAMPLES @@ -98,8 +96,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -166,9 +179,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md index ee9d37ab1d52..38c0e4c82347 100644 --- a/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter schema: 2.0.0 @@ -15,14 +15,14 @@ The old resource name is obsolete after this API is invoked. ### Restart (Default) ``` -Restart-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [-Confirm] - [-WhatIf] [] +Restart-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RestartViaIdentity ``` -Restart-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] [-Confirm] - [-WhatIf] [] +Restart-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -33,7 +33,7 @@ The old resource name is obsolete after this API is invoked. ### Example 1: Restarts troubleshooter instance ```powershell -Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" ``` ```output @@ -41,9 +41,7 @@ Location TroubleshooterResourceName -------- -------------------------- - 0b8b324c-be00-410b-988b-175815878690 - - + 0b8b324c-be00-410b-988b-175815878690 ``` Restarts Troubleshooter instance. @@ -98,8 +96,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -153,9 +166,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IRestartTroubleshooterResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md index 401be57c699c..81b0dc013b2b 100644 --- a/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/stop-azselfhelptroubleshooter schema: 2.0.0 @@ -15,13 +15,13 @@ Ends the troubleshooter action ### End (Default) ``` Stop-AzSelfHelpTroubleshooter -Name -Scope [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### EndViaIdentity ``` Stop-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -31,7 +31,7 @@ Ends the troubleshooter action ### Example 1: End Troubleshooter action ```powershell -Stop-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" +Stop-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" ``` ```output @@ -104,8 +104,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -164,4 +179,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - diff --git a/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md index 4ebc4ea23881..99f39ca7f735 100644 --- a/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.SelfHelp-help.xml Module Name: Az.SelfHelp online version: https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution schema: 2.0.0 @@ -14,24 +14,16 @@ Update the requiredInputs or additional information needed to execute the soluti ### UpdateExpanded (Default) ``` -Update-AzSelfHelpSolution -ResourceName -Scope [-Content ] [-Parameter ] - [-ProvisioningState ] [-ReplacementMapDiagnostic ] - [-ReplacementMapMetricsBasedChart ] - [-ReplacementMapTroubleshooter ] [-ReplacementMapVideo ] - [-ReplacementMapVideoGroup ] [-ReplacementMapWebResult ] [-Section ] - [-SolutionId ] [-Title ] [-TriggerCriterion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Update-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzSelfHelpSolution -InputObject [-Content ] [-Parameter ] - [-ProvisioningState ] [-ReplacementMapDiagnostic ] - [-ReplacementMapMetricsBasedChart ] - [-ReplacementMapTroubleshooter ] [-ReplacementMapVideo ] - [-ReplacementMapVideoGroup ] [-ReplacementMapWebResult ] [-Section ] - [-SolutionId ] [-Title ] [-TriggerCriterion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Update-AzSelfHelpSolution -InputObject [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,20 +34,19 @@ Update the requiredInputs or additional information needed to execute the soluti ### Example 1: Update the Solution Resource ```powershell $parameters = [ordered]@{ - "SearchText" = "Can not RDP" - "vault_name" = "DemoKeyvault" + "SearchText" = "Can not Search" } $criteria = [ordered]@{ "name" =" ReplacementKey" "value" = "" } -Update-AzSelfHelpSolution -ResourceName test-resource -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria ``` ```output -Location Name ResourceGroupName --------- ---- ----------------- - test-resource testRg +Location Name ResourceGroupName +-------- ---- ----------------- + test-resource234 DiagnosticsRp-Ev2AssistId-Public-Dev ``` Updates the requiredInputs or additional information needed to execute the solution @@ -77,21 +68,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Content -The HTML content that needs to be rendered and shown to customer. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -154,109 +130,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProvisioningState -Status of solution provisioning. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapDiagnostic -Solution diagnostics results. -To construct, see NOTES section for REPLACEMENTMAPDIAGNOSTIC properties and create a hash table. +### -ProgressAction +{{ Fill ProgressAction Description }} ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsDiagnostic[] +Type: System.Management.Automation.ActionPreference Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapMetricsBasedChart -Solution metrics based charts -To construct, see NOTES section for REPLACEMENTMAPMETRICSBASEDCHART properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IMetricsBasedChart[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapTroubleshooter -Solutions Troubleshooters -To construct, see NOTES section for REPLACEMENTMAPTROUBLESHOOTER properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionsTroubleshooters[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapVideo -Video solutions, which have the power to engage the customer by stimulating their senses -To construct, see NOTES section for REPLACEMENTMAPVIDEO properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideo[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapVideoGroup -Group of Videos -To construct, see NOTES section for REPLACEMENTMAPVIDEOGROUP properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IVideoGroup[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplacementMapWebResult -Solution AzureKB results -To construct, see NOTES section for REPLACEMENTMAPWEBRESULT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.IWebResult[] -Parameter Sets: (All) -Aliases: +Aliases: proga Required: False Position: Named @@ -281,7 +161,7 @@ Accept wildcard characters: False ``` ### -Scope -This is an extension resource provider and only resource level extension is supported at the moment. +scope = resourceUri of affected resource.\
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ```yaml Type: System.String @@ -295,58 +175,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Section -List of section object. -To construct, see NOTES section for SECTION properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISection[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SolutionId -Solution Id to identify single solution. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Title -The title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -TriggerCriterion Solution request trigger criteria To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ITriggerCriterion[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] Parameter Sets: (All) Aliases: @@ -397,9 +231,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20230901Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource ## NOTES ## RELATED LINKS -